Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
achakilam1022
Creator II
Creator II

Pivot tables totals percentage (QlikSense)

Hi,

I need help in generating each row total as a percentage of column total and if there are sub categories then how to generate row total as % of parent total.

Please see the attached images to get the structure of the pivot table.

The rows contain school brand in first image ( in the second image rows contain school brand and all the sub categories of schools); the column is Date and the measure (Total Matches)  is calculated by a expression.

Thank you.

kaushik.solanki

5 Replies
Varsha
Contributor II
Contributor II

Hello,

 

Did you get solution for your query?

I am struggling with same issue. I want to sum my revenue at dimensionality 0.

 

Thanks

Varsha

nickharshaw
Contributor II
Contributor II

Hi, 

 

Did you find a solution here? I'm trying to do this exactly, but not finding any good examples. The links above aren't all that helpful.

 

Thanks.

Varsha
Contributor II
Contributor II

Hi,

I tried using dimensionality in expression and it solved the problem.

Thanks
Varsha
nickharshaw
Contributor II
Contributor II

Hi again,

Just updating for anyone who comes from future Google queries (like myself). A screenshot of my PivotTable is attached; it's basically two dimensions, product category and product subcategory, where I was calculating the % of total orders by product.

 

I wanted the sum of percentages of product subcategory order share to total to the parent percentage of product category instead of the product subcategory calculating as a total of the entire share of all orders of all products. Hopefully, that makes sense. Here's the formula I used:

 

If(Dimensionality() = 2,

Count({<Scenario={'Order'}>} Primary_Key)
/
Aggr(
Count ( TOTAL <Product> {Scenario={'Order'}>} Primary_Key ) ,Product,AEMSize),

Count({<Scenario={'Order'}>} Primary_Key)
/

Count (TOTAL <Product> {<Scenario={'Order'}>} Primary_Key))