Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
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()

10 Replies
Highlighted

Re: Qlik Sense auto num format always one decimal

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'

Highlighted
Partner
Partner

Re: Qlik Sense auto num format always one decimal

could you show your expected result in chart object ?

Highlighted
Partner
Partner

Re: Qlik Sense auto num format always one decimal

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

nop.PNG

Highlighted
Partner
Partner

Re: Qlik Sense auto num format always one decimal

Thank you, but I would like to find another way

Highlighted
Partner
Partner

Re: Qlik Sense auto num format always one decimal

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

Highlighted
Partner
Partner

Re: Qlik Sense auto num format always one decimal

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.

Highlighted
Contributor II
Contributor II

Re: Qlik Sense auto num format always one decimal

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?

Highlighted
Creator II
Creator II

Re: Qlik Sense auto num format always one decimal

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.

Highlighted
Contributor II
Contributor II

Re: Qlik Sense auto num format always one decimal

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'