Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Aggr function to simply group by

Hi,

Is there a function which simply groups by a field by a key. Like I want to group by sales by item code.

I don't want to sort out min/max value

I want to do something like [Value] - AGGR(Min([Value]), [ITEMCODE])

So all the values corresponding to an item must display 'x' units less if 'x' is the minimum sales value for that item.

How do I make sure that the [Value] field is grouped by the item code, because if I just use the above simply, my expression errors out...

I want to achieve this in the front end and not the script.

Thanks..

5 Replies
MK_QSL
MVP
MVP

[Value] - AGGR(Min(TOTAL <ITEMCODE> [Value]), [ITEMCODE])

Not applicable
Author

thank you so much Manish, Could you suggest what would be the expression when we have two keys to aggregate upon?

MarcoWedel

Do you require to display this in a chart?

What are your dimensions?

Anonymous
Not applicable
Author

we use below expression to aggr on two keys:

[Value] - AGGR(Min(TOTAL <ITEMCODE> [Value]), [ITEMCODE],Fieldname)

replace fieldname with your dimension/field

Hope this helps.

Regards

Neetha

Not applicable
Author

yes, in a chart and this expression is itself my calculated dimension.. along with itemcode as the second dimension..