2 Replies Latest reply: Jun 15, 2011 5:17 AM by Byron Van Wyk RSS

    Number Format

    Byron Van Wyk

      Hi Guys and Gals,

       

      I have the following code

       

      If(ValueList('Turnover','Cost Of Sales','Gross Margin','Gross Margin %')='Turnover',
          
      num(num#(sum({<AccountGroupDescription={'IS-Turnover'}>}Values))*-1,'R0.0')

       

      I am trying all methods known to me to format by set analysis value. On my straight table the value comes out like this 1234.45 If I want to format it to read 1234, how would I do that. I also need to know how to format this to a % as well

       

      All of this is being done in the expression area

       

       

       

      Cheers,

      Byron

        • Number Format
          Patrick Laredo

          hi Byron,

           

          since your expression has to evalaute your valuelist you must have the 4 possible expressons explicitly listed, ins't that so?

           

          so each expression could have it's very own num() formatting.

           

          num() takes up to 4 parameters although it's the second one you want to be changing

           

               num( expression [ , format-code [ , decimal-sep [ , thousands-sep ] ] ] )

           

          a tip given to me was to copy the values found on the chart->properties->number tab in the "Format pattern" box and paste into your num function.

           

          to set hat up create a chart having as dimension AccountGroupDescription and as expression sum(Values). Select one Description at a time and play around with the number formatting till you get what you want for each variety of the AccountGroupDescription and then place the respective "Format pattern" in your desired chart expression. When finished with just remove this temporary work chart.

           

          hope this helps.