4 Replies Latest reply: Sep 1, 2017 10:58 AM by Sridhar Kasthuri RSS

    Dynamic Label for Measure Expression in Bar Chart

    Sridhar Kasthuri

      Hi All,


      I have basic Bar Chart and Variable Extension used to toggle between Metrics( Volume and Sales) by Period.


      Defined vMetric=1 in load Script


      Created values in Variable Extension


      1= Volume

      2= Sales


      So In Measure expression I have written as


      if(vMetric=1, Sum(Volume),



      Dimension: YearMonth


      Now my Bar Chart show me Metric values for every YearMonth as


      if(vMetric=1, Sum(Volume),

      if(vMetric=2,Sum(Sales)):    20.5

      when Volume is select in Variable extension Toggle.


      I need as

      Volume: 20.5 when Volume is selected in Toogle

      Sales: 100. 7 when Sales is selected in Toogle.


      Let me know your thoughts please