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: 
LaureDenivelle
Partner - Contributor III
Partner - Contributor III

Aggr function in pivot table

Hi everyone 

I'm using Qlik Sense August 2022.

I have a pivot table with quantity value per month and I want to know the total % aggregated by 2 dimensions. The table is always fully expended.

For example here we have a total of 2619 for January. So for Distribution of "Niveau 1" I need 1509 / 2619 = 57,62%

LaureDenivelle_0-1680600924135.png

For now I tried this : 

Sum({<MYTD = {1}, Mois >} Quantity)
/Sum(TOTAL{<MYTD = {1} >}Quantity)

But when I try to aggr, as a result I have 1509 / Qty all months, not just January.

Then I tried this : 

Aggr(Sum({<MYTD = {1}, Mois >} Quantity)
/Sum(TOTAL{<MYTD = {1} >}Quantity),Month)

Result : 

LaureDenivelle_0-1680608470660.png

So not even close to what I'm waiting for 😄 

Here a set of Data to reproduce my case. 

Thanks for your help.

Regards

Labels (2)
1 Solution

Accepted Solutions
Or
MVP
MVP

Perhaps:

Sum({<MYTD = {1}, Mois >} Quantity

/

Sum({<MYTD = {1}, Mois >} Total <Month> Quantity)

View solution in original post

2 Replies
Or
MVP
MVP

Perhaps:

Sum({<MYTD = {1}, Mois >} Quantity

/

Sum({<MYTD = {1}, Mois >} Total <Month> Quantity)

LaureDenivelle
Partner - Contributor III
Partner - Contributor III
Author

How effective !

thanks a lot, it works.

Regards