Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Tell us which business and trade publications you read most regularly: RESPOND 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
Creator III
Creator III

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
Creator III
Creator III

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...
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.