6 Replies Latest reply on Apr 16, 2018 1:58 AM by Helen Stange

    Converting Distinct Measure Values to a (row) Dimension

    Helen Stange

      Hi All,

      I've been given an excel table (which is the data source for my Tableau workbook), which has a less-conventional setup than I'm use to; As column headers I have various features of hotels (pool, spa, etc). A numeric hotel code is listed in the respective columns, if that hotel contains that given feature. If a given hotel has all of the features listed in this sheet, the hotel code would appear multiple times on the sheet, namely one time under each feature. There are no row headers.


      What I'd like to see in a Tableau Crosstab is each distinct hotel code listed on the far left (as row headers), and all the hotel features listed across the top (as column headers). Then, if a hotel contains any given feature, the corresponding "cell" says TRUE. If the hotel doesn't contain a feature, the corresponding "cell" says FALSE. So rather than listing the hotel code each time under the feature, there's rather a true or false if the hotel has the given feature.


      Since the hotel codes are numeric to begin with, I've converted the features' data types to Strings (so that the codes don't automatically try to sum!). Then I converted each feature to a Dimension... but it's not giving me the expected results. I had a feeling it would be good to create a parameter that contains all the individual hotel codes, but I don't know how to do that within Tableau (in excel I would use the Remove Duplicates tool, but I want to learn how to operate from within Tableau exclusively, if possible)


      Any ideas?


      Tableau workbook and Excel workbook attached.

      Many Thanks!