Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
RCGreco2304
Contributor II
Contributor II

AGG Function with set analysis

Guys,

 I need to aggregate the information by the highlighted fields, but I would like the value to be repeated for each of the lines of the aggregation

RCGreco2304_0-1643391513140.png

Note that in the last column I have the aggregated values ​​correctly but it only appears for a single row of the aggregated dimensions

RCGreco2304_1-1643391647112.png

 

 

Labels (1)
1 Solution

Accepted Solutions
tresesco
MVP
MVP

If I understood correct, try putting NODISTINCT in aggr(), like:

Sum( (Aggr(Nodistinct Sum(...

View solution in original post

4 Replies
hic
Former Employee
Former Employee

You need to have all relevant dimensions listed in your Aggr() function. For example, year, month and sales batch are missing.

Now you have a grain mismatch between your chart and your Aggr() call.

See more on https://community.qlik.com/t5/Qlik-Design-Blog/Pitfalls-of-the-Aggr-function/ba-p/1463275

HIC

RCGreco2304
Contributor II
Contributor II
Author

Henric,

Thanks for your answer!

But the Sales Batch field is one field that I don't want to agregate, and the Year and Month were agrgegated by the Id_Date. Right?

tresesco
MVP
MVP

If I understood correct, try putting NODISTINCT in aggr(), like:

Sum( (Aggr(Nodistinct Sum(...

RCGreco2304
Contributor II
Contributor II
Author

Perfect. That's it. Thanks a lot