Qlik Community

Ask a Question

New to Qlik Sense

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

Announcements
Qlik Users, make your voice heard! Participate in Wisdom of Crowds® Market Study: Start Survey
cancel
Showing results for 
Search instead for 
Did you mean: 
amartinez35
Partner
Partner

Qlik Sense auto num format always one decimal

Hi community,

I'm using Qlik Sense April 2018 and I want to use auto format, with auto unit, but the number of decimal change every time .

It's possible to ALWAYS limit to one decimal ?

Thanks,

Aurélien

PS: I don't want a expression with multi num()

12 Replies
balabhaskarqlik

May you can define your Measure like this:

if(Sum(Sales) > 1000000,  num(Sum(Sales)/1000000, '#.##0,##M', ',', '.'),

    if(Sum(Sales) > 1000, num(Sum(Sales)/1000,  '#.##0,##K', ',', '.'), num(Sum(Sales), '#.##0,##', ',', '.')))

'#.##0,##M'

'#.##0,##K'

Then data will align to the above format.

Or

Select Number or Money format, modify the format like below:

if(Sum(Sales) > 1000000,  num(Sum(Sales)/1000000, '#.##0,##M', ',', '.'),

    if(Sum(Sales) > 1000, num(Sum(Sales)/1000,  '#.##0,##K', ',', '.'), num(Sum(Sales), '#.##0,##', ',', '.')))

'#.##0,##M'

'#.##0,##K'

agigliotti
Partner
Partner

could you show your expected result in chart object ?

amartinez35
Partner
Partner

In this chart I have 2 decimals, but I want one (and keep auto unit)

nop.PNG

amartinez35
Partner
Partner

Thank you, but I would like to find another way

agigliotti
Partner
Partner

i guess you can't, why you don't use the custom number formatting ?

amartinez35
Partner
Partner

When I display the data of the Group it's in billion and for subsidiary it's in million or in kilo. With custom formatting I'm losing this functionality.

bradychen
Contributor II
Contributor II

it's so easy to do that in PowerBI, I don't know why Qlik is not doing anything about it

We want to take advantage of the auto unit changing and at the same time being able to define the number of decimal places to be used. Has anyone found a solution yet?

Ezir
Creator II
Creator II

Hi @amartinez35 

 

Choice Measure expression 

measure_expression.png

And insert the expression:

 

Dual(Num(Sum(Sales)/Pow(10,3*(Div(Log10(Sum(Sales)),3))),'#.##0,0')&pick(div(Log10(Sum(Sales)),3),'k','M','B','T'),Sum(Sales))

 

I hope helps.

bradychen
Contributor II
Contributor II

Thanks pretty long one if I then have to use set analysis for each of the sum(sales) expression - this worked fine though.

The format should be '#,##0.0'