Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

List with shops offering Min or Max price

Hi everybody,

There is a need to have a comma separated list of shops offering minimal and maximal price of a product.

It is quite simple to get min and max prices, but difficult to get corresponding values in other field

The expression

=Concat(

     DISTINCT aggr(if(price=Min(total<product> price),shop),

                         product,price),

',')

works only if there is just one shop with minimal price. No shop list in case several shops with equal minimal price

Any advice will be helpful!

See example attached

Rgds,
AT

1 Solution

Accepted Solutions
danielrozental
Master II
Master II

I believe the aggr is missing the shop

=Concat(

     DISTINCT aggr(if(price=Min(total<product> price),shop),

                         shop,product,price),

',')

View solution in original post

3 Replies
danielrozental
Master II
Master II

I believe the aggr is missing the shop

=Concat(

     DISTINCT aggr(if(price=Min(total<product> price),shop),

                         shop,product,price),

',')

Anonymous
Not applicable
Author

A lot of thanx, Daniel!

The solution was too simple

rohit214
Creator III
Creator III

hi,

can you explain each term in your expression i am not able to get it

thanks

rohit