Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

pranaview
Contributor II

What number format should I use while dealing with percentage values

Hi Guys,

I am working on a QlikView dashboard. I am using following expression for one of my KPIs

=num(Sum((Set Expression)Field),'##%')

If the result is in two digits then the above expression works fine as it rounds up/down the decimal value but when it becomes 100% then I get the following result

1e+02%

Now if I the use following expression

=num(Sum((Set Expression)Field),'###%')

Everything works fine if the result is 100% but if it is for ex: 97.89%, I will get 97.8% but I don't want the decimal digits but the rounded absolute number i.e. 98%

Any tip or suggestion will be appreciated as I am kinda confused at this point.

Pranav

1 Solution

Accepted Solutions
Partner
Partner

Re: What number format should I use while dealing with percentage values

Sorry use this.

 

num(Sum((Set Expression)Field),'#,##0%')

 

 

Regards

Kamal

5 Replies
Highlighted
Partner
Partner

Re: What number format should I use while dealing with percentage values

Hi Pranav,

 

Try something like this.

num(Sum((Set Expression)Field),'##%')

 

Regards

Kamal

Partner
Partner

Re: What number format should I use while dealing with percentage values

Sorry use this.

 

num(Sum((Set Expression)Field),'#,##0%')

 

 

Regards

Kamal

albert_guito
Contributor II

Re: What number format should I use while dealing with percentage values

Hi,

Maybe using the Frac function you can do something like this

 

=num(Sum((Set Expression)Field),if(Frac(Sum((Set Expression)Field))=0,'###%','##%')) 

 

Ag+

 

Ag+
pranaview
Contributor II

Re: What number format should I use while dealing with percentage values

Hi Kamal,

Thanks for the suggestion. It worked! I don't really know how but it did.

Cheers!
Pranav
pranaview
Contributor II

Re: What number format should I use while dealing with percentage values

Hi Albert,

Thanks for the suggestion. Appreciate it.

Regards,
Pranav