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: 
yashcena
Contributor III
Contributor III

Total in Pivot Table not coming correctly

I have a horizontal pivot table in which there are four expressions. I have to show the average of the 1st expression and the total of the other 3.

I want to show the entire total i.e available months' data+projected months' data

Thanks,

YASH

1 Reply
sunny_talwar

Try using this as your expression

=Sum(Aggr(IF(IsNull(GetFieldSelections(Year)) ,if(sum({<Year={$(=vCurrentYear)},[Cost Element Bucket] ={'Salaries & Wages'}>}eUSD_Amt),sum({<Year={$(=vCurrentYear)},[Cost Element Bucket] ={'Salaries & Wages'}>}eUSD_Amt),num(sum(TOTAL{<Year={'$(vCurrentYear)'},[Cost Element Bucket] ={'Salaries & Wages'}>}eUSD_Amt)/COUNT({<Year={'$(vCurrentYear)'}>}DISTINCT TOTAL(Sp_Month)),'$##.00 M')),num(sum({<Year={$(=vYearSelection)},[Cost Element Bucket] ={'Salaries & Wages'}>}eUSD_Amt)/1000000,'$##.00 M')), Month))


Capture.PNG