1 of 1 people found this helpful
What a very odd Excel file! So there are a few ways we could go about this. The easiest is to use the "Pivot" function on the connect to data screen
I've then created this calculation to filter out the NULL rows.
[Filter Out Null Rows]
Bringing this onto the filter shelf and setting to False.
Now for the (slightly) tricky part. As you want TRUE and FALSE and we don't have any data (to draw a mark) for FALSE ones (even if we left the [Filter Out Null Rows] not every combination would be present), so I've used a little Tableau trick called "data densification". It's a bit odd, but if you have 2 opposing blue (dimension) pills, and a table calculation, Tableau generates the missing marks, which we can access. Here's a quick GIF of that happening (notice the extra blue mark appear in Week 3/ Category D.
I then brought MIN(Number of Records) onto the Text tile, and set up the 2 following things
So the way the number 1 (well any positive number) is displayed is the word "TRUE" and any NULLS are displayed as "FALSE".
Hope that helps, and I've also done a more "Visual" version....Tableau is a data viz tool after all
Pivot the data. I created a new data source using your excel. In the screen shot I selected all the columns, and then did right-click, "PIVOT".
The attached workbook shows what you get as a result. Tableau creates two fields: [Pivot Field Names] and [Pivot Field Values]. In your case the field values are the hotel numbers, and Tableau starts you off with that field as a measure, but you can convert it to a dimension:
And that's the status where I left your workbook (attached). Now you can do all sorts of things the way you want it.
Hotel_Features A.twbx 51.5 KB
Thank you very much Deepak! This is exactly what I was looking for. I did try pivoting before but I think the key to this solution (which is what I was missing) are the calculated fields you set up to transform that pivot to my requirements for True/False. Much Appreciated - I'll use this trick a lot in the future
Wow Simon this is Tableau Wizardry I've never seen! A fantastic alternative to the calculated methods from Deepak, and furthermore a great opportunity to learn more about the "hidden"--or at least "less obvious"--possibilities within this software. Thank you very kindly for helping myself and other community members
Thanks Joe for pointing me in the direction of the Pivot - didn't realize this was even an option!