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
singh_gagan03
Frequent Visitor

DAX Requirement || Help

Hi All,

 

I am facing a problem in writing DAX for the scenario explained below, need help asap. The Data Source is Excel Worksheet.

 

Visuals on page: 2 slicers (country and item) and matrix visuals 

 

In the image, the yellow column is the desired result.

 

Scenario 1 Please check the image below and in the particular matrix visual I have Item, Country, Value, Volume, and Price. I need to find the minimum price for an item across the countries and the name of the country giving that minimum price.

 

Scenario 2 Please check the image below and now I am changing the country selections in the slicers and item slicer kept as it is now the minimum price for an item should change according to the country selections and the name of the country minimum price should also be updated.

 

Scenario 3 Please check the image below and now I am changing the item and the country selections are kept as it is now the minimum price for an item should change according to the country selections and the name of the country minimum price should also be updated.

 

Please help me writing a DAX for the below scenarios, it would be great if we can connect for the explanation of the DAX as well and TIA in advance. 

 

 
 

image.png

 

 

 

2 REPLIES 2
wdx223_Daniel
Super User
Super User

@singh_gagan03 

Min Price=CALCULATE(MIN(Table[Price]),ALLEXCEPT(Table,Table[Item]),ALLSELECTED(Table[Country]))

Country With Min Price=CONCATENATEX(TOPN(1,CALCULATETABLE(Table,ALLEXCEPT(Table,Table[Item]),ALLSELECTED(Table[Country])),CALCULATE(MIN(Table[Price])),ASC),Table[Country],",")

HI @wdx223_Daniel ,

 

I have implemented the min price DAX but the result I am getting is not aligned as per the image I shared with you. The DAX you have shared with me is giving me the minimum value as same across slicer selections.

 

For example in scenario 1 the DAX for Item 1 it is returning me min price as 33.33 and country as C1 for all selections which are correct but when I make the selection as Country = C2, C3 then the min price should be 100, and the country now be C2.

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.