4 Replies Latest reply on Jul 21, 2016 8:16 AM by Ravi S

    Re-scaling values in Tableau

    Ravi S

      I am having a data set where I need to rescale the values by grouping the records on category and date.

       

      Category   Value      Date

      A              120       Jan 1

      B              190       Jan 3

      A              872       Jan 1

      C              876       Jan 5

      B              872       Jan 3

      C              879      Jan 5

       

      The calculation goes like

       

      Category    Old Value      New Value

      A                120                (100/120) * 120   i.e. (100/ first value in the group)* old value

      A                872                (100/120) * 872 

      B                190                (100/190) * 190 

      B                872                (100/190) * 872 

      C                876                (100/876) * 876

      C                879                (100/876) * 879

       

      As you can see that for each group (group by category and date) I need to take the first value ,divide from 100 and multiply the result by the old value. I tried using something like {FIXED [category],[date]: (100 / LOOKUP [value], FIRST()) * [value])}. but that gives me error.

       

      Let me know how to peroform this calculation