
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Aggregation function is not working
@swuehl Please help here
I am trying to aggregate data based on two fields say temp_field, measure_description , as my field eligible_points has value like 0 and 3. whenever i m apply below condition i m not getting data . i am expecting 3 as outcome but it is not aggregating properly and no value is coming as like in screenshot.
sum(aggr(sum({<[month no] =2,[Measure flag] =4, [month year]>} distinct [elgibile points]),[measure descrition],temp_field)).
Need help to handle this.
Thanks


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi there!
It would be helpful to see the whole expression, with all the dimensions of the AGGR, but it looks to me like your have a classical "grain mismatch", or something I like calling a violation of the "Third Law of AGGR". Your AGGR expression is not as detailed as your chart, and you are expecting multiple results (3), however you are only getting one result in the first line - because AGGR is distinct by default.
You can try adding the NODISTINCT keyword to your AGGR, if it doesn't cause duplication (I might in some cases), or your should bring the dimensions of the AGGR in line with the dimensions of the chart.
To learn more about advanced use of Set Analysis and AGGR(), check out the agenda of the Masters Summit for Qlik - coming soon to Orlando and to Dublin!
