Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I calculate a percentage from a subset of a dimension?

Hello!

I'm a new to the forum and looking for some help with a calculation.  I need to calculate a percentage from a dimension that has 13 fields and want to know how to do so by using specified fields ( i.e. % of gree  from the total of black + green).

My QlikView pivot table depicts a Dimension (Competition Category) with 2 expressions (Number of Awards) and (Award Percentage)

Pivot Cat.png

Is there a way to calculate the % of green relative to the total of green + black dots?  I would like to report this KPI as an object within my dashboard.

Thanks for your assistance.

Pat

2 Replies
Sergey_Shuklin
Specialist
Specialist

Hi, Patrick!

You can use a set analysis to solve it:

sum({<[Competition Category]={'Authorized Resale','Brand Name', and so on}>}[Number of Awards])/sum([Number of Awards]).

Not applicable
Author

Hi Patrick!

Use the expression that you use to calculate the green and black indicators in the if clause of the expression.

i.e.

sum({<condition for green>}[Number of Awards])/sum({<condition for green and black>}[Number of Awards]).

Use display values in percentage to get the value in the format you need.

Cheers,

Rohan