Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
jcampbell474
Creator III
Creator III

Sum of Rows vs. Expression Total

I have a straight table where the row level numbers are correct, but the subtotal isn't.  I found several threads around this and it looks to be an aggregation issue, but can't get anything to work.

Can anyone help me understand what I'm doing wrong?

((avg(aggr(sum(SalaryxMin),UserId,cReportGroup, FiscalYearMonth ))*

((sum(HandleTimeSecs/60)) +(sum(aggr(sum(total <UserId,FiscalYearMonth,cReportGroup,Location> {<cReportGroup=,CS_Dept=>} AvailSecs)/60*sum(WorkGrpSecs)/sum(total <UserId,FiscalYearMonth,Location> {<cReportGroup=,CS_Dept=>} WorkGrpSecs),UserId,cReportGroup,FiscalYearMonth,Location))))))

TIA,

Jason

1 Solution

Accepted Solutions
sunny_talwar

Basically to sum the rows, you need to have an Sum(Aggr( YourExpression, YourDimension/s))

Sum of rows in pivot tables

Sum(Aggr(

((avg(aggr(sum(SalaryxMin),UserId,cReportGroup, FiscalYearMonth ))*

((sum(HandleTimeSecs/60)) +(sum(aggr(sum(total <UserId,FiscalYearMonth,cReportGroup,Location> {<cReportGroup=,CS_Dept=>} AvailSecs)/60*sum(WorkGrpSecs)/sum(total <UserId,FiscalYearMonth,Location> {<cReportGroup=,CS_Dept=>} WorkGrpSecs),UserId,cReportGroup,FiscalYearMonth,Location))))))

,YourDimensions))

View solution in original post

2 Replies
sunny_talwar

Basically to sum the rows, you need to have an Sum(Aggr( YourExpression, YourDimension/s))

Sum of rows in pivot tables

Sum(Aggr(

((avg(aggr(sum(SalaryxMin),UserId,cReportGroup, FiscalYearMonth ))*

((sum(HandleTimeSecs/60)) +(sum(aggr(sum(total <UserId,FiscalYearMonth,cReportGroup,Location> {<cReportGroup=,CS_Dept=>} AvailSecs)/60*sum(WorkGrpSecs)/sum(total <UserId,FiscalYearMonth,Location> {<cReportGroup=,CS_Dept=>} WorkGrpSecs),UserId,cReportGroup,FiscalYearMonth,Location))))))

,YourDimensions))

jcampbell474
Creator III
Creator III
Author

Ah, okay.  Perfect!

Thank you again, Sunny.  You make it look so easy!