Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
I am using Simple KPI Extension and Standard Qliksense #1 KPI object to display Total Sales. Simple KPI Shows values such 35M, 30K, etc Standard KPI shows 35.41M, 30.33K etc. what I am looking is Values such as 35.4M, 30.3K with decimal values, can you please help on this.
Thanks
Raj
You probably might have tried this already but want to check anyway: What happens when you select Number formatting as 'Custom' (instead of auto) and in the Format pattern text box use this : "#,##0.0".
Hello Nakul,
When I change to custom format to as you mentioned, then values displays completely like 30,300,167.99. but I would like to see 30.3M that is way I am using custom formula based on Rob formula which is given below again.
SET vScaleNumber=if($1>1000000, num($1/1000000,'#,##0.000M')
,if($1>1000, num($1/1000,'#,##0.000K')
,num($1,'#,##0')
));
then use expression $(vScaleNumber(sum(InvoiceValue)))
this code is working fine without decimals. but I wanted with 1 decimal.
Raj
what happens when you change the formula to this:
SET vScaleNumber=if($1>1000000, num($1/1000000,'#,##0.0M')
,if($1>1000, num($1/1000,'#,##0.0K')
,num($1,'#,##0.0')
));
Raju,
Is this what you are trying to achieve?
This was accomplished with Gysbert's previous answer:
=pick(ceil(log10(sum(Sales))/3),
num(sum(Sales),'#,##0.0'),
num(sum(Sales)/1000,'#,##0.0 K'),
num(sum(Sales)/1000000,'#,##0.0 M')
) & ''
Hello Michael,
Yes, this is what I wanted, thank you and Gysbert. This is working fine and this is correct Answer for Dynamic KPI values for 1 decimal.
Thanks
Raj
Hello Michael,
That expression worked fine in a Table, but in a Line Chart it is not working, it doesn't show anything. Can you help me with that?
Thanks!
Have you tried just doing the expression without the formatting? Using the example above it would just be sum(Sales). A line chart should format as needed.
Hello Michael,
What I want is to have the auto number formatting (K, M, G) but with just 1 decimal. Using the expression in a table gives me the format I want with just 1 decimal, but in a bar or line chart it does not work, it shows nothing.