7 Replies Latest reply on Oct 16, 2018 8:23 AM by Thomas Rones

    Calculated field challenge

    Rakesh Dhankhar

      This is my first post and I am coming from only couple of days of exposure to Tableau. So please excuse my basic questions...

       

      My challenge is to sort my data into a desired newly created category.

       

      I have three basic logical categories in my raw data,

      1. series Ax... To identify this I created a set.

      2. series ISxxxx... Category identified with "beginswith"  clause

      3.series other...  All remaining Categories

       

      Now a value might belong to either of these 3 categories or to all of them. However, "series Ax" relationship with corresponding value needs to take priority over all others Category-Value relationships, followed by series "ISxxxx-Value" set

       

      Thus in our example

      All records with  Value V1/V2 should be grouped together and may be say labelled as "Cat A" in Calculated field.

      All records with  Value V3 should be grouped together and may be say labelled as "Cat B" in Calculated field.

      All records with  Value V4 should be grouped together and may be say labelled as "Cat C" in Calculated field.

       

      Raw Data                                                    

                                                           

      CategoryValue
      A1V1
      A2V2
      IS001V1
      IS002V2
      IS003V3
      1234V1
      235V2
      3245V3
      23456V4

       

      Expected Data

       

      CategoryValueCalc Field
      A1V1Cat A
      A2V2Cat A
      IS001V1Cat A
      IS002V2Cat A
      IS003V3Cat B
      1234V1Cat A
      235V2Cat A
      3245V3Cat B
      23456V4Cat C

       

      Message was edited by: Rakesh Dhankhar