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], ", ")

Helpful resources

Announcements
GregDeckler

How to Get Your Question Answered Quickly

Power BI Super User, Greg Deckler, explains

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

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.

Top Ideas
Users Online
Currently online: 6 members 1,215 guests
Please welcome our newest community members: