Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ilanbaruch
Specialist
Specialist

KPI number formatting

hi all,

in  my model i use native qlik KPI's

i want to keep B M K number formatting but to add one decimal i/e :

ilanbaruch_0-1597583967370.png

instead of 6.57 -> to present 6.573M

 

any ideas ?

advanced thanks 

Labels (2)
1 Solution

Accepted Solutions
Kushal_Chawda

try below

=pick(match(-1,YourExpression>=1000000000,YourExpression>=1000000,YourExpression>=1000),
num(YourExpression/1000000000 ,'#,##0.000 B'),
num(YourExpression/1000000 ,'#,##0.000 M'),
num(YourExpression/1000,'#,##0.000 K'))

 

Now you can use  measure expression as format  like below

Annotation 2020-08-16 190308.png

View solution in original post

9 Replies
Kushal_Chawda

You can provide custom format like below

Annotation 2020-08-16 152303.png

ilanbaruch
Specialist
Specialist
Author

thank you Kush

bu how to add the M \ K \ B  ?

Ksrinivasan
Specialist
Specialist

hi,

i have workaround solution

1. your value / 1000000 

2. set KPI heading  like Value in Millions,

3. Change Number formatting from Auto to Number and Change Number pattern  #.##0.00 to #.###0.000 as give below 

 

Ksrinivasan_0-1597587949154.png

 

Kushal_Chawda

try below

=pick(match(-1,YourExpression>=1000000000,YourExpression>=1000000,YourExpression>=1000),
num(YourExpression/1000000000 ,'#,##0.000 B'),
num(YourExpression/1000000 ,'#,##0.000 M'),
num(YourExpression/1000,'#,##0.000 K'))

 

Now you can use  measure expression as format  like below

Annotation 2020-08-16 190308.png

ilanbaruch
Specialist
Specialist
Author

thank you!

aheavy95
Creator
Creator

Hi I used this calculation 

aheavy95_0-1652797361855.png

in my project and for some reason it doesnt work for me when I add part of a set analysis:

pick(vKPI_TOTAL_NET,$(vScaleNumber2(Sum({$<Year={2007}>}TotalDue))),$(vScaleNumber2(Sum({$<Year={2007}>}SubTotal_SO)))) 

it works here but when I add the months it doesnt anymore: 

pick(vKPI_TOTAL_NET,$(vScaleNumber2(Sum({$<Year={2007},[Month Num]={7,8,9,10,11,12}>}TotalDue))),$(vScaleNumber2(Sum({$<Year={2007}>}SubTotal_SO))))

 

any idea why?

 

 

Danica-Cortez
Contributor II
Contributor II

As of Jan 2024, you can simply use a combination of setting numerical abbreviations in the load script

AND specifying decimal in "Format pattern" in the measure section (ie, change automatic format of 0A to your desired precision 0.0A, etc.)

DanicaCortez_0-1705535472070.png

DanicaCortez_1-1705535592759.png

 

 

ElisaF
Contributor III
Contributor III

Hi @Danica-Cortez 

Please, can you tell me which version of QlikSense you have the options from the image above (Number Formatting: Auto with Format pattern 0.0A).

In which QlikSense objects? Can  be applied into #KPI?

Thank you

 

Danica-Cortez
Contributor II
Contributor II

I can't manage to see which version of Qlik Sense, but I am using the Multi KPI viz.