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: 
sjhussain
Partner - Creator II
Partner - Creator II

Pivot Table not showing Totals

Hello,

I am having problems with showing totals in Pivot Table.

I have two dimensions:

Sector

SubSector

The problem is with Sector Overhead Cost.  I am using an aggregate function to just show the totals for each sector but not getting the Totals in the Sector Overhead Cost.

Expression:

=if(Dimensionality()=1,sum(aggr((sum({<COA_MAPTYPE={'Expense'}, CostType={'Sector Admin Cost'}>}EXPENSE)

- sum({<COA_MAPTYPE={'Expense'}, CostType={'Sector Admin Cost'}>}REVENUE)),COSTCENTRE_SECTOR)))

Will appreciate if someone can assist.

Thanks.

Totals.jpg

2 Replies
Clever_Anjos
Employee
Employee

You have a conditional to calculate only when Dimensionality()=1, right?

=if(Dimensionality()=1,sum(aggr((sum({<COA_MAPTYPE={'Expense'}, CostType={'Sector Admin Cost'}>}EXPENSE)

- sum({<COA_MAPTYPE={'Expense'}, CostType={'Sector Admin Cost'}>}REVENUE)),COSTCENTRE_SECTOR)))

sjhussain
Partner - Creator II
Partner - Creator II
Author

The reason I have dimensionality() = 1 is to show only totals for each of the Sector.  As the requirement is not to show values for the sub sectors .  Show only Sector Totals.

Thanks.