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: 
Not applicable

Min value by two dimensions

Hello,

I'm having a problem in retrieving the min value by two dimensions.

I mean I have this data structure

ProductSupplierAvg Price
A11.5
A20.8
A32.1
B13.2
B24.2
B33.8
C17.1
C28.2
C36.9

and I need to obtain for each product the supplier having the min average price, that is to say:

ProductSupplierAvg Price
A20.8
B13.2
C36.9

I've tryed a lot of combinations with min and aggr functions but with no results.

Can anyone help me?

Thanks in advance,

MJ

16 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi MJ,

     Is it working as your need?

Celambarasan

SunilChauhan
Champion II
Champion II

in dimension

Supplier

Product


Min(Aggr(sum(Amount)/count(Supplier),Supplier, Product))

hope this help

Sunil Chauhan
Not applicable
Author

It works for the example but not in my dasboard, I'm checking it to find the problem....

Thanks a lot!

Not applicable
Author

but... this is not the average price... sum(Amount)/count(Supplier)...

SunilChauhan
Champion II
Champion II

is it showing any error?

Sunil Chauhan
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Could you explain me briefly about the problem that currently your facing now.

Celambarasan

Not applicable
Author

I've found the problem!!! I had some product puerchases that didn't have supplier so the average price was 0.

The expression Min(Total <Product> Aggr(avg(Amount/Quantity),Supplier, Product)) works perfectly now.

Thank you so much for your help!