Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements
QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
tom2qlik
New Contributor III

Rewriting a Percentage Expression

Hi All,

Is there an easier way to write this chart expression for converting to percentage?

I would like to know if the set analysis has to be placed by every sum or is there a way to do an overall set analysis and then calculate the percentage.

sum({<Category = {"Reduce"}>}[<10])/
(
sum({<Category = {"Reduce"}>}[<10]) + sum({<Category = {"Reduce"}>}[<100])

+ sum({<Category = {"Reduce"}>}[100-1000]) + sum({<Category = {"Reduce"}>}[>1000]))

Thanks

Tom

1 Solution

Accepted Solutions
hector_munoz_in
Valued Contributor

Re: Rewriting a Percentage Expression

Hi Tom,

Try the following:

sum({<Category = {"Reduce"}>} [<10]) / (sum({<Category = {"Reduce"}>} [<10] + [<100] + [100-1000] + [>1000])

Regards,

H

3 Replies

Re: Rewriting a Percentage Expression

Hi,

Try this.

sum({<Category = {"Reduce"}>}[<10]/([<10] +[<100]+ [100-1000] + [>1000]))


Regards,

Kaushik Solanki

hector_munoz_in
Valued Contributor

Re: Rewriting a Percentage Expression

Hi Tom,

Try the following:

sum({<Category = {"Reduce"}>} [<10]) / (sum({<Category = {"Reduce"}>} [<10] + [<100] + [100-1000] + [>1000])

Regards,

H

tom2qlik
New Contributor III

Re: Rewriting a Percentage Expression

Thanks!

Community Browser