3 Replies Latest reply: Sep 20, 2016 4:05 AM by Giuseppe De Vivo RSS

    Alternative Dimensions Button

    Giuseppe De Vivo

      Hi all,

       

      I'd like to create a button menu that allows the user to choose the "alternative dimension" to show in a chart.

      I know that there is the possibility to add alternative dimensions directly in the properties of the chart, but I'd like to create an alternative way to select those dimensions.

       

      So, I have 3 dimensions (Dimension1, Dimension2 and Dimension3) and one misure.

      I'd like to calculate the misure on the only one dimension selected by the user.

      I have created a variable called "var1" with 3 values : "dim1", "dim2" and "dim3".

      I have created 3 botton too, and I have associated the value to them.

      So:

      Botton1 set var1 with the value "dim1",

      Botton2 set var2 with the value "dim2",

      Botton3 set var3 with the value "dim3".

       

      At least, in the chart field expression editor i have written this expression:

      if(var1=dim1', Dimension1,
        if(var1='dim2', Dimension2,
          if(var1='dim3', Dimension3
              )
          )
      )
      

       

      In this way, I have a chart and 3 bottons that allow to the user to select the alternative dimensions.

      The problem is that it doesn't work, and I don't understand why.

      I think the problem is in the expression, but I no have idea how to write the expression.

       

      Can someone help me?