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: 
devarasu07
Master II
Master II

Sub Total using aggr() with Dimensionality?

Hi All,

Issue with partial sub total but able to get peak sold qty, please help me on the below expression. thanks

Peak sold qty

=If(Dimensionality()=1,

  max({<Week_No=,Week_No,Batch,ArticleNo>} aggr(sum({<Week_No=,Week_No,ArticleNo>}Sold_Qty),Week_No,Batch,ArticleNo)),

max({<Week_No=,Week_No,Batch,ArticleNo>} aggr(sum({<Week_No=,Week_No,ArticleNo>}Sold_Qty),Week_No,Batch,ArticleNo))

  )

Peak sold Qty Total_1.JPG

1 Solution

Accepted Solutions
maxgro
MVP
MVP

try

sum(aggr(max(Sold_Qty), ArticleNo, Batch))

1.png

View solution in original post

2 Replies
maxgro
MVP
MVP

try

sum(aggr(max(Sold_Qty), ArticleNo, Batch))

1.png

kaushiknsolanki
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi,

Try this.

Sum(Aggr(max({<Week_No=,Week_No,Batch,ArticleNo>} aggr(sum({<Week_No=,Week_No,ArticleNo>}Sold_Qty),Week_No,Batch,ArticleNo)),ArticleNo,Batch))

Regards,

Kaushik Solanki

Please remember to hit the 'Like' button and for helpful answers and resolutions, click on the 'Accept As Solution' button. Cheers!