Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
d_petrov
Contributor III
Contributor III

Adding expression(dimension) over existing expression in pivot table

Hello,

I have a pivot table with 3 dimensions and one expression.

One of the dimensions is moved above the expression.
My goal is to add percentage of green to maroon items at the top of the dimensions. (check the screenshot) .
How to do this, with expression or dimension? The calculation should be (count green cells) /  (total count of maroon+ green cells). Please, help.

Best Regards,.

D. Petrov

 

1 Reply
chrismarlow
Specialist II
Specialist II

Hi,

Short of a bespoke extension I don't think you will get exactly what you want, but there might be some options that get something that gets the same sort of output. For simplicity on the below I am just showing count of numbers where sum=1 (so show 1 for x and 2 for y), your expressions are going to be more complicated.

First option - if you have a variable number of items in the dimension you are pivoting horizontally, or are using other pivot table functionality, you can arrange a second pivot table above, with only your horizontal dimension & using AGGR to get the calculations over the right set of values;

20190616_1.png

Second option - if the dimension you are pivoting on has a set number of items you could use a straight table and put the calculation in the expression label;

20190616_2.png

Do either of these look like they might help?

Cheers,

Chris.