Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the foll. data set:
Category | Product | Part | Sales |
ac | a | a1 | 100 |
ac | a | a1 | 100 |
ac | a | a2 | 100 |
ac | b | b1 | 100 |
ac | b | b2 | 100 |
ac | c | c1 | 100 |
ac | c | c2 | 100 |
I'm stumbling on some results I'm getting with the foll expressions:
count(aggr(nodistinct sum(Sales),Category, Product, Part))
count(aggr(nodistinct sum(Sales),Category, Product))
count(aggr(nodistinct sum(Sales),Category))
Could somebody explain the above expressions, and what results I would get ?
Gerry
See example
Gerry,
As mentioned by Marcus, please read the above posts to under the Aggr() function. In simple terms you are Grouping the data and aggregating (Sum in your case) by the fields mentioned above. Then you are counting the results and not eliminating any potential duplicate values.
Cheers,
DV
www.QlikShare.com
Yes thanks all for you help ! it became clear to me after I posted.
The count is simply returning the count of the number of items in the aggr function.
i.e. count(100,200,300) returns 3.
Very elegant from QV !
I'm glad you got it.
Please can you close the thread by marking the relevant answer(s). It might help other users.
Cheers,
DV