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: 
byrnel0586
Creator
Creator

Total Aggr Expression for Each Row

Hi all,

I currently have a straight table that displays an overall weighted avg at the bottom due to total mode being enabled. I need to modify the expression so that that overall weighted avg (3.00) shows on each row, not just the last one as a total.

Below is the expression I'm currently using and a screenshot of the table:

=if(num(ReportDate) < '43312',
SUM(Aggr(
IF($(RoundedRate%)>=num#(PtileBeg) and $(RoundedRate%)<= num#(PtileEnd)
,
Star) * Only(RptCardWeight)
,
Star,_MeasureYearKey,PCP_ID))
/
SUM( RptCardWeight),
round(SUM(Aggr(
IF($(RoundedRate%)>=num#(PtileBeg) and $(RoundedRate%)<= num#(PtileEnd)
,
Star) * Only(RptCardWeight)
,
Star,_MeasureYearKey,PCP_ID))
/
SUM( RptCardWeight) ,0.1))

Any help is much appreciated!!

1 Reply
byrnel0586
Creator
Creator
Author

Never mind I think I just got it

=round(SUM(TOTAL(Aggr(
IF($(RoundedRate%)>=num#(PtileBeg) and $(RoundedRate%)<= num#(PtileEnd)
,
Star) * Only(RptCardWeight)
,
Star,_MeasureYearKey,PCP_ID)))
/
SUM( TOTAL(RptCardWeight)) ,0.1)