Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

hoangpm8
New Contributor II

Issue Format Qlik Sense

I have a issue. I have a script format number in measure as:

if( $(reportType) = 1,Num(Sum([SalesInOut.GSV])/1000000, '#,##0.00'), Num(Sum([SalesInOut.Quantity]), '#,##0'))

But it does not work, it format base on Number formating qlik sense

Capture.PNG

8 Replies
yddona_lyn
New Contributor III

Re: Issue Format Qlik Sense

Hello!

Have you tried changing the number formatting to Auto? Setting it to auto should follow the number format in your script

hoangpm8
New Contributor II

Re: Issue Format Qlik Sense

I tried and it is not same my format.

yddona_lyn
New Contributor III

Re: Issue Format Qlik Sense

can you share your qvf?

yddona_lyn
New Contributor III

Re: Issue Format Qlik Sense

I tried using your formula and variable and was able to transform the number format

zero.PNGone.PNG

hoangpm8
New Contributor II

Re: Issue Format Qlik Sense

I have filter, Year. If year = 2004, format is #,##0.00%. If year = 2005, format is #,##0. But it fail.

hoangpm8
New Contributor II

Re: Issue Format Qlik Sense

Here

yddona_lyn
New Contributor III

Re: Issue Format Qlik Sense

I tried using this formula:

seems repetitive but it works:

num(if(Year = 2004, (Sum(Measure1)/100), (Sum(Measure1))), if(Year=2004, '#,##0.00%', '#,##0'))

or this one

num(sum(Measure1)/if(Year=2004, 100,1), if(Year=2004, '#,##0.00%', '#,##0'))

I think this formatting is only happening when using KPI object. Because using the charts, it's showing the correct number format even inside the if condition

hoangpm8
New Contributor II

Re: Issue Format Qlik Sense

Thanks @Yddona Lyn Aranzanso