Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Read about the latest Qlik Community enhancements on the Community News blog!
cancel
Showing results for 
Search instead for 
Did you mean: 
pranaview
Creator III
Creator III

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

Labels (4)
1 Solution

Accepted Solutions
kamalqlik
Partner
Partner

Sorry use this.

 

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

 

 

Regards

Kamal

View solution in original post

5 Replies
kamalqlik
Partner
Partner

Hi Pranav,

 

Try something like this.

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

 

Regards

Kamal

kamalqlik
Partner
Partner

Sorry use this.

 

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

 

 

Regards

Kamal

View solution in original post

albert_guito
Creator II
Creator II

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

Hi Kamal,

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

Cheers!
Pranav
pranaview
Creator III
Creator III
Author

Hi Albert,

Thanks for the suggestion. Appreciate it.

Regards,
Pranav