16 Replies Latest reply: Feb 17, 2017 12:03 PM by Rob Wunderlich RSS

    Dynamically changing number formats?

    Simon Hogg

      I have some numbers with a very wide range of values, from $10 to $10,000,000,000+


      At the moment I am using an expression which is SUM ([Invoice Value])/1000000 to get the values into "Millions of dollars" but for very large and very small numbers this looks ugly.


      I can format the underlying number so if it is over a Million, it is divided by a Million, otherwise divide it by 1000;

          ( IF SUM ([Invoice Value]) > 1000000, SUM ([Invoice Value]) / 1000000 , SUM ([Invoice Value]) / 1000 )


      But I cannot seem to work out the correct number-formatting codes, so if the number is over $1M, it is shown with an M ($320M), otherwise it is shown with a k ($256k)


      Just for reference, In Excel I would do; [>1000000]$0.0,," M";[>1000]$0.0,, "k";$0 is there something similar in Qlik Sense?