3 Replies Latest reply: Apr 2, 2018 7:33 PM by Mario Segal RSS

    100% Stacked Bar with Conditions on Set

    Mario Segal

      I am trying to build a 100% stacked chart, however I have 2 filters on the chart that I applied as set conditions too

       

      a specific quarter using a variable, and a specific  cross border grouping (we have 3 types), in addition I have a dimension of [Year Qtr] and a dimension of [Region] on teh chart - the region is for bar colors, and the quarter is because otehrwise I can't do the stacked (even though it is filtered to only one)

       

      if I do this

      sum ( { $<[Year Qtr]={"$(last_quarter)"}> +  <[Cross Border 3 Values]={'Intra'}> }  [Fraud Net Det Amt USD])

       

      I get the correct values for my variable of interest

       

      But when I add the divisor

      sum ( { $<[Year Qtr]={"$(last_quarter)"}> +  <[Cross Border 3 Values]={'Intra'}> }  [Fraud Net Det Amt USD])

      /

      sum ( {$ <[Year Qtr]={"$(last_quarter)"}> +  <[Cross Border 3 Values]={'Intra'}>}  total [Fraud Net Det Amt USD])

       

      I do not get the some of those values, so the % do not add upt o 100%

       

      I understand the total is somehow negating the selections or one of them, but I do not know how to fix this

       

      Any help will be appreciated