cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
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
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], ", ")

Helpful resources

Announcements
Back to School Contest

Back to School Contest

Engage and empower students with Power BI!

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Summit Australia 2019

Summit Australia 2019

Travel to Melbourne and network with thousands of peers!

Top Ideas
Users Online
Currently online: 277 members 3,027 guests
Please welcome our newest community members: