Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Calculating the lowest value among columns

Dear experts,

I am new to Power BI, and I must admit I've been feeling quite stupid.

I was wondering how I can add a fifth column in this table so that I can find the minimum price among the three suppliers.

Thank you very much!

Product NameSupplier 1Supplier 2Supplier 3Lowest price
Plug503047?
Pick536?
String121618?

 

 

 

1 ACCEPTED SOLUTION
camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

You can unpivot the supplier values:

Capture.PNG

 

and this measure:

 

Measure =
VAR _minPrice = CALCULATE(MIN('Table'[Value]); ALLEXCEPT('Table'; 'Table'[Product Name]))
VAR _tbSupplier = CALCULATETABLE(VALUES('Table'[Supplier]); FILTER(ALLEXCEPT('Table';'Table'[Product Name]); 'Table'[Value] = _minPrice))
RETURN CONCATENATEX(_tbSupplier; 'Table'[Supplier]; ",")
 
Capture 1.PNG
 


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

5 REPLIES 5
camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

You can unpivot the supplier values:

Capture.PNG

 

and this measure:

 

Measure =
VAR _minPrice = CALCULATE(MIN('Table'[Value]); ALLEXCEPT('Table'; 'Table'[Product Name]))
VAR _tbSupplier = CALCULATETABLE(VALUES('Table'[Supplier]); FILTER(ALLEXCEPT('Table';'Table'[Product Name]); 'Table'[Value] = _minPrice))
RETURN CONCATENATEX(_tbSupplier; 'Table'[Supplier]; ",")
 
Capture 1.PNG
 


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



az38
Community Champion
Community Champion

Hi @Anonymous 

have a look at the great solution by @Zubair_Muhammad  here https://community.powerbi.com/t5/Desktop/MIN-with-Multiple-Columns/td-p/369307

Column =
VAR temp = { Table1[Supplier 1], Table1[Supplier 2], Table1[Supplier 3] }
RETURN
    MINX ( Temp, [Value] )

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn
Anonymous
Not applicable

Thank you very much!!!

Anonymous
Not applicable

Thank you very very much!

I was wondering if there is an easier way, or if it is better to add an excel table to the model that will already contain the lowest values and their respective suppliers.

 Best,

MullerBR

Anonymous
Not applicable

Hi @camargos88 ,

Whether the Table 2 in the following screen shot is your expected result? If yes, please unpivot these suppliers columns first, then create calculated table with the below formula:

PQuotes = SUMMARIZE('Product quote','Product quote'[Product Name],"SupplierL",CALCULATE(MAX('Product quote'[Attribute]),FILTER('Product quote','Product quote'[Product Name]=EARLIER('Product quote'[Product Name])&&'Product quote'[Value]=MIN('Product quote'[Value]))),"Lowest price",MIN('Product quote'[Value]))

expected result.JPG

Best Regards

Rena

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors