2 Replies Latest reply on Jun 6, 2018 9:15 AM by Arnau Forne

    Calculated Field provides results at wrong dimension hierarchy level

    Arnau Forne

      My DB is based on the following DIMENSION hierarchy (from bottom to top):

      1. 1.LOCAL
      2. 2.CLIENTE - LOCAL aggregate
      3. 3.CADENAS - CLIENTE aggregate


      MEASURE values are at LOCAL level but I need to work at CADENAS level for some calculations. For now, the main measure is GSV


      I've created a Calculated Field called Test Ranges in order to rank CADENAS based on the amount of GSV they have.


      Here it is the calculation I made:


      IF [GSV]<=1000 THEN "0 to 10000"

      ELSEIF [GSV]<=20000 THEN "10001 to 20000"

      ELSEIF [GSV]<=30000 THEN "20001 to 30000"

      ELSEIF [GSV]<=50000 THEN "30001 to 50000"

      ELSEIF [GSV]<=100000 THEN "50001 to 100000"

      ELSEIF [GSV]<=1000000 THEN "100001 to 1000000"

      ELSE ">1000000"



      However, when I check the detail of CADENAS by each rank I see that Tableau is still providing the results at LOCAL level.


      I've tried everything (and read plenty of threads) but I can't find the way to get the results at CADENA level.


      So, what's missing is to tell the calculated to provide the results of GSV at CADENA instead of LOCAL.


      How can I do that? Is there any way to add to this formula at what level of my hierarchy I want to work with?


      IF [GSV]<=1000 THEN "0 to 10000"

      ELSEIF [GSV]<=20000 THEN "10001 to 20000"


      Many thanks in advance,