0
votes

I have a spreadsheet with a column populated with elements from a list of possible options. Take this simple example in Excel:

enter image description here

The 'Fruit' column contains data from the 'Types of fruit' column. The frequency of each fruit type is shown and is easy to calculate in Excel.

When I import the data into Tableau with 'Fruit' as the column dimension and 'Number of Records' as the measure, it doesn't display the fruit types that do not occur at all.

enter image description here

Is there a way of generating a table in Tableau that has all the types of fruit in the rows and the respective frequencies in the column?

1
What happens when you put Fruit Types in the view?Bernardo
It displays '1' next to each fruit typeSIDC Demo
That's because you are counting records. Replace Number of Records with OccurrenceNick
I would like to do it without using the 'Occurence' column from Excel. i.e. I want to create the 'Occurence' column in Tableau.SIDC Demo
What would the new Occurrence column consist of? What is your calculation?Nick

1 Answers

-1
votes

You need to put Fruit and Types Of Fruit on seperate sheets in Excel and then left join on Types of Fruit when you import into Tableau:

http://i.stack.imgur.com/qNnpu.jpg

You can then add Types of Fruit to the view and cnt(Fruit).

http://i.stack.imgur.com/pj7vH.jpg