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: 
Not applicable

aggr function

Hi.I faced a problem.

1.png

I have tw fields Subregion and Product. Expr  is

cout({$<CalendarYearQuarter={'2013-Q1'}>} distinct CustINN ) 

In total we see 3362. How to write expression which will calculate this total sum in front of every product.

What I would like to get is

1.png

This   expression   aggr( sum(Expr),Subregion  )   doesn`t work.

16 Replies
Not applicable
Author

cout({$<CalendarYearQuarter={'2013-Q1'}>} distinct CustINN ) 

MK_QSL
MVP
MVP

aggr(count({1}DISTINCT CustINN),Subregion)

MK_QSL
MVP
MVP

Full Total

count(TOTAL {<CalendarYearQuarter={'2013-Q1'}>} Distinct CustINN )

For SubRegion wise Total

count(TOTAL <Subregion>{<CalendarYearQuarter={'2013-Q1'}>} Distinct CustINN )

Not applicable
Author

Manish, you are geneus) It Works!  Thank you very much)

MK_QSL
MVP
MVP

Glad that my answer helps you.

Kindly close this thread by selecting correct/helpful answer so that others having the same problem can use this thread.

Not applicable
Author

Manish, one more question. I didn`t notice that the filter was on Subregion. So this expression

count(TOTAL <Subregion>{<CalendarYearQuarter={'2013-Q1'}>} Distinct CustINN )

calculate total amount, but how to aggregate it by Subregion? Thanks

MK_QSL
MVP
MVP

Full Total

count(TOTAL {<CalendarYearQuarter={'2013-Q1'}>} Distinct CustINN )

For SubRegion wise Total

count(TOTAL <Subregion>{<CalendarYearQuarter={'2013-Q1'}>} Distinct CustINN )


UPDATE: ONLY HELPFUL ANSWER?


Check enclosed file...