6 Replies Latest reply: Nov 11, 2016 6:24 AM by dixit panchal RSS

    Conditional Number Formatting

      A question from a newbie here.  I have a chart where I've parameterized the calculation for the value axis.  I let the user choose whether they want to view the frequency of an occurance, the hours lost or the dollar value of that time.  What I'd like to do is to set the number formatting based on that selection.  I believe this can be done right from the expression by using code like the following:


      if(ChartMeasure = 'Dollars', num(sum(duration)*75/3600, '$#,##0.00'),

          if(ChartMeasure = 'Frequency', num(count(ent_id), '#,##0'),

              if(ChartMeasure = 'Hours', num(sum(duration)/3600, '#,##0.0 hrs'))




      and then setting the expression number format settings to "expression default" in the number tab.  However, this doesn't seem to be working as I get the same generic formatting no matter what I select.  I know the if statement is being executed, though, as the numbers come out correct for the calculations.


      Any help would be greatly appreciated!