4 Replies Latest reply on Jan 15, 2020 2:49 PM by Budi Lubis

    Mapping column headers from another data source - Dynamic

    Ankit Patel

      Hello DataFam,

       

      I have stumbled upon a scenario where I have 2 data sources (both are extracts published on Tab Server originally coming from MS SQL Server as Custom SQL into Tableau Desktop). Source table "SampleData" contains columns that have a generic naming (labels) i.e. Sub_Cat1, Sub_Cat2, etc... as you can see in the below image:

       

      Additionally, I have a separate "MappingTable" that contains Generic Names and Actual Names (labels) that should be utilized in the Source table. See below image:

       

      I need to figure out a way to dynamically utilize the Actual_Names from MappingTable and replace it in source table "SampleData". Its renaming the dimension in source table from mapping table but has to be done dynamically - somehow getting Sub_Cat1 from source to match with Sub_Cat1 from mapping as the Actual_Name to provide labeling the dimension. And of course this could change based on customer's configuration each time they send us data.

       

      Scenario:

      Customer Week 1 could have Sub_Cat1 = Accessories, Sub_Cat2 = Appliances, Sub_Cat3 = Art, etc... However, same customer

      Customer Week 2 could have Sub_Cat1 = Art, Sub_Cat2 = Accessories, Sub_Cat3 = Appliances, etc...

      Based on above scenario - the SourceData and MappingTable will update based on customer's needs in Week 2.

       

      Any thoughts on how to achieve this? I seem to have run out of ideas. Thank you in advance. I have attached sample workbook with this email as well.