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

Help on pivot table totals including set analysis

Hi All,

I have a problem in calculating totals in pivot table.

The expression is like this:

if (MITX_PERIOD_FLAG='Y', sum(PROJACTTREE_Budget), sum({<Date=, Year=, Quarter=, Month=, month_num=>} Budget_2))

Dimension is 'DOCNO'.

The total in the pivot table is showing only the numbers related to 'PROJACTTREE_Budget' field only.

The same if i'm trying to show this in text box.

I've trying using the aggr function but with no help.

I'll appreciate your propt help.

Best

David

5 Replies
er_mohit
Master II
Master II

Hii have you tried like this

Sum(total Fieldname)

david_ze
Partner - Contributor III
Partner - Contributor III
Author

not working

er_mohit
Master II
Master II

If you talking about sub total then for this you have to enclose your expression in sum() and in presentation tab check on show partial sum for that particular dimension like this

sum(if (MITX_PERIOD_FLAG='Y', sum(PROJACTTREE_Budget), sum({<Date=, Year=,Quarter=, Month=, month_num=>} Budget_2)))

or if you want total on every row then try this

sum(total if (MITX_PERIOD_FLAG='Y', sum(total PROJACTTREE_Budget), sum({<Date=, Year=,Quarter=, Month=, month_num=>} Budget_2)))


david_ze
Partner - Contributor III
Partner - Contributor III
Author

shows 'error in expression' in both forms

iliyansomlev
Partner - Creator II
Partner - Creator II

You may try removing the if clause like

sum({<MITX_PERIOD_FLAG={'Y'}>}PROJACTTREE_Budget)

+sum({<Date=, Year=, Quarter=, Month=, month_num=,MITX_PERIOD_FLAG-={'Y'}>} Budget_2)