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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
madhuqliklondon
Creator II
Creator II

Grouping in set analysis

Hi Friends ,

I am trying to get grouping done in expression level. What I got in attached file is I am trying to understand free item offers making customers buy products and calculating their associated products. With the help of stalwar1‌ I got to this point , now I am trying to do is group items by brand in order level it self and I do not want to calculate  other products in that order for example in order number 1

(see attached) totals of Sony only leaving other products because I want to calculate bundle offers as the promotion. Mostly same brand products are higher in an order , other brands products are less any way if this gives any ideas. Please select free on filter.

expected results: 

  

itemquantitytotals
lg 3d glasses1550
samsung ear phones1650
sony ear phones1300

Thanks in advance .

1 Solution

Accepted Solutions
sunny_talwar

May be this

Sum({<product_type={'free'}>}

  Aggr(

  Sum(TOTAL <[order number], brand> {<[order number] = P({<product_type={'free'}>}[order number]),product_type>}[amount])

  ,[order number],item.no, brand))

View solution in original post

4 Replies
sunny_talwar

May be this

Sum({<product_type={'free'}>}

  Aggr(

  Sum(TOTAL <[order number], brand> {<[order number] = P({<product_type={'free'}>}[order number]),product_type>}[amount])

  ,[order number],item.no, brand))

madhuqliklondon
Creator II
Creator II
Author

Thank you Sunny(Super Star).

madhuqliklondon
Creator II
Creator II
Author

Hi Sunny,

Can you explain in simple terms what the expression is doing ?

madhuqliklondon
Creator II
Creator II
Author

stalwar1‌ Sunny,

When you have free time please explain.

Many thanks