1 2 Previous Next 17 Replies Latest reply on Mar 16, 2018 8:41 AM by Buster Sammo

# What is best way to sum up number of checked columns

I think this is a problem that could be done many ways (like change the data format etc),

but I wondered what the easiest way would be in Tableau -  ie bringing the data into Tableau, just as it is, and then changing as needed once inside Tableau.

I thought this should be pretty easy, but it was not easy for me. But then I am only just learning Tableau.

Input data:

Assume you have a  table looks like this. You have a bunch of zip codes, and each month has an X

if you did some action that month . (At this point, don't care what the action is - assume something like found a geocache box)

An X for a given month means a box was found in that zipcode.

 zipcode apr may jun jul oct nov 60004 60025 x x x x x x 60048 60062 x x x x x 60193 60631 x 60007 60010 60010 60015 x 60016 60022 60029

Output desired:

The problem I want to visualize is to show a count  for each zipcode, or how many months in a given zipcode have a checkbox.

And perhaps I don't want to show it as a map -- just want to show it as a table or a chart. As a table it would look like this:

 zipcode total 60004 60025 6 60048 60062 5 60193 60631 1 60007 60010 60010 60015 1 60016 60022 60029

or even this:

 zipcode apr may jun jul oct nov total 60004 60025 x x x x x x 6 60048 60062 x x x x x 5 60193 60631 x 1 60007 60010 60010 60015 x 1 60016 60022 60029

Thanks for any help :-)

• ###### 1. Re: What is best way to sum up number of checked columns

Drag Zipcodes to Row

and use this Calc

Thanks

Deepak

• ###### 2. Re: What is best way to sum up number of checked columns

I don't see how that works without changing my values in the columns that I want to sum up (eg the apr, may , june, etc columns - where an X would be a 1 and blank would be 0)

• ###### 3. Re: What is best way to sum up number of checked columns

Can you attach some fake sample data. I can show you how it works?

• ###### 5. Re: What is best way to sum up number of checked columns

Can you paste few lines of data here pl?

• ###### 6. Re: What is best way to sum up number of checked columns

It's just like in the question -- the zipcodes each have a row and the columns are months.

The rows show the months that have x's under the month column headings and an X counts as 1 :

zipcodeaprmayjunjuloctnov
60004
60025xxxxxx
60048
60062xxxxx
60193
60631x
60007
60010
60010
60015x
60016
60022
60029

1 of 1 people found this helpful
• ###### 7. Re: What is best way to sum up number of checked columns

I am asking if the file that I submitted above via dropbox could be dragged into Tableau. And once there - what I need to do to sum up the number of X's there are for each zipcode

• ###### 8. Re: What is best way to sum up number of checked columns

Here it is:

To get above, you need to Pivot your data to get all individual Months as a single Month Field. Remember, Tableau Loves Vertical data.

Pl Mark it Helpful and CORRECT to close Thread, if it Helps. The CORRECT Button i sin Main Thread, not in email

Thanks

Deepak

1 of 1 people found this helpful
• ###### 9. Re: What is best way to sum up number of checked columns

Here is another way: If you want to see X in view

1 of 1 people found this helpful
• ###### 10. Re: What is best way to sum up number of checked columns

so did you first pivot the data in excel before bringing it into tableau?

• ###### 11. Re: What is best way to sum up number of checked columns

BTW - I cannot open the Tableau link -- it says something about only workbooks open in tableau public ccan be opened...

• ###### 12. Re: What is best way to sum up number of checked columns

No Tableau has this option to pivot

• ###### 13. Re: What is best way to sum up number of checked columns

can you possibly put this into Public Tableau? Then I think I should be able to access it..

thx

• ###### 14. Re: What is best way to sum up number of checked columns

Would Do That

1 2 Previous Next