Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Q&A with Qlik - Qlik Cloud Migration: Questions about migrating to Qlik Cloud? Catch the latest replay!
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

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar
MVP
MVP

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
MVP
MVP

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!