Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Qlik1_User1
Specialist
Specialist

Number formatting

HI All,

KPI is showing sum(sales ) as 1.58M, is it possible to convert it in number formatting to 1.6M.

In KPI I have used number formatting as Auto.

Labels (1)
1 Solution

Accepted Solutions
justISO
Specialist
Specialist

Hi, if this sum(sales) number is static (or always be in millions), you can try something like this:

num( sum(sales) / 1000000 , '#.0M')

if it is dynamic, you can try something like this:

dual(num(sum(Sales)/pow(10,3*floor(log10(sum(Sales))/3)),'#.0'&pick(floor(log10(sum(Sales))/3),'k','M','B')),sum(Sales))

but change Number formatting to 'Measure expression' with this.

View solution in original post

4 Replies
justISO
Specialist
Specialist

Hi, if this sum(sales) number is static (or always be in millions), you can try something like this:

num( sum(sales) / 1000000 , '#.0M')

if it is dynamic, you can try something like this:

dual(num(sum(Sales)/pow(10,3*floor(log10(sum(Sales))/3)),'#.0'&pick(floor(log10(sum(Sales))/3),'k','M','B')),sum(Sales))

but change Number formatting to 'Measure expression' with this.

abhijitnalekar
Specialist II
Specialist II

Hi @Qlik1_User1 ,

Change the below format patter property as per your requirement.

abhijitnalekar_0-1655467048813.png

 

Regards,
Abhijit
keep Qliking...
Help users find answers! Don't forget to mark a solution that worked for you!
Qlik1_User1
Specialist
Specialist
Author

@abhijitnalekar ,

I am not getting this format option (I am looking for this in KPI)

Qlik1_User1_0-1655726268297.png

 

Qlik1_User1
Specialist
Specialist
Author

@justISO but sum(sales ) less than 1000 is getting missed by this expression.