Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
micsim123
Contributor III
Contributor III

Row percent for subtotals in pivot table Qlik Sense

Hi!

In a Qlik Sense pivot table I want to show row percentages adding to 100 % for each row/subgroup.

Here's my pivot table:

pivot_subtotal_row_percent.png

The row percent for each year is correct. It sums to 100%.

But I also need a row total of 100% for each Study Programme. That is: in row no 3 (the B-DMD Study Programme) the percent of Females should be 27 / (27+37) = 42,2 % and not the 9,9%.

The percent is calculated with this expression:

SUM(ADMITTED)

/

SUM(total <STUDYYEAR> ADMITTED)

Any ideas?

Best regards

1 Solution

Accepted Solutions
sunny_talwar

Try this

If(Dimensionality() = 2,

Sum(ADMITTED)/Sum(TOTAL <STUDYYEAR, STUDYPROGRAMME> ADMITTED),

Sum(ADMITTED)/Sum(TOTAL <STUDYYEAR> ADMITTED))

View solution in original post

7 Replies
sunny_talwar

Try this

If(Dimensionality() = 2,

Sum(ADMITTED)/Sum(TOTAL <STUDYYEAR, STUDYPROGRAMME> ADMITTED),

Sum(ADMITTED)/Sum(TOTAL <STUDYYEAR> ADMITTED))

micsim123
Contributor III
Contributor III
Author

Hi Sunny

It works fine in Qlik Sense Desktop, but when I try it on our Qlik Sense Server solution, the percents are the same as my original one.

Could there be any differences on how the Dimensionality() function works i Desktop and Server? Borth are june 2017 release.

Regards

Michael

micsim123
Contributor III
Contributor III
Author

Hi Sunny

Sorry about the former question - my bad. I got it to work fine on Server.

Thanks!

Michael

sunny_talwar

I don't see any reasons for differences... can you check if you get different values for Dimensionality() function when you create it as an expression?  also do you have more than 2 dimensions here?

Capture.PNG

sunny_talwar

Awesome!!! Please close the thread by marking correct response

Qlik Community Tip: Marking Replies as Correct or Helpful

Best,

Sunny

micsim123
Contributor III
Contributor III
Author

I would love to make it a correct answer, but there is no Correct Answer button

in the answer ??

2017-09-06_1046.png

micsim123
Contributor III
Contributor III
Author

Someone fixed it. Thanks!