cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JeromeC Frequent Visitor
Frequent Visitor

show "cheapest" vendor.

Hi Team,

I have a table below from which i'd like to show the cheapest supplier  presented on a card. The expected answer is just "A" because the price is "1"

itempricesupplier
a1A
b1A
c3C
d4D


However, the result I get is "A , A". I am using the measure 

 
1lowest price = 
CONCATENATEX(TOPN ( 1, 'table',[price], ASC ), 'table'[Supplier], ", ")
I wish to only see "A" once, as in only 1 supplier even if there are more than 2 suppliers with the lowest price. 

Please help, cheers. 
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: show "cheapest" vendor.

Hi @JeromeC 

 

Try this:

 

1lowest price = 
CONCATENATEX(CALCULATETABLE(DISTINCT('table'[Supplier]),TOPN ( 1, 'table',[price], ASC )), 'table'[Supplier], ", ")
1 REPLY 1
Highlighted
Super User
Super User

Re: show "cheapest" vendor.

Hi @JeromeC 

 

Try this:

 

1lowest price = 
CONCATENATEX(CALCULATETABLE(DISTINCT('table'[Supplier]),TOPN ( 1, 'table',[price], ASC )), 'table'[Supplier], ", ")