Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr function including set analysis with same field?

Hi guys,

Is it possible when using an aggr function to include one of the fields used in it in the set analysis part?

My aim is to create a trending chart (by ignoring month selected) but do aggregation across this.  Currently having no luck.

my expression is as follows:

sum({$<Master_Calendar_MonthYear=>}aggr(Case_Limits,Master_Calendar_MonthYear=))

Any thoughts would be appreciated.

Regards,

5 Replies
Not applicable
Author

Hi,

I am not sure what you want to do, but you can start to use something like this:

aggr(sum({$<Master_Calendar_MonthYear=>}Case_Limits,Master_Calendar_MonthYear=))

Halmar

SunilChauhan
Champion II
Champion II

use this

aggr(sum({$<Master_Calendar_MonthYear=>}Case_Limits),Master_Calendar_MonthYear)

Sunil Chauhan
Not applicable
Author

Hi,

Thanks for this.  However, in the line chart I am creating I still do not get the line (data values) spanning across the months. 

eg if I click on September 2011 (Master_Calendar_Month_Year) I want to see a line chart with all the Months Limits represented.  And to make it even more confusing my original expression is slightly longer than stated:

sum({$}aggr(Case_Limits,[Case_RPC],Case_Division,Master_Calendar_MonthYear))

This gives me the correct figure but only for the month I am selecting.  If I could get this to neglect the calendar selection the user makes it would be perfect.

Thanks again for suggestion.

Not applicable
Author

Correction to expression I am using:

sum({$<Master_Calendar_MonthYear=>}aggr(Case_Limits,[Case_RPC],Case_Division,Master_Calendar_MonthYear))

Not applicable
Author

I managed to get the solution in the end:

Expression as follows:

sum({$<Master_Calendar_MonthYear=>} aggr( sum{$<Master_Calendar_MonthYear=>}Case_Limits), Case_RPC,Case_Division,Master_Calendar_MonthYear ))