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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
FilipFireFlyBI
Resolver I
Resolver I

minimal value percountry/category with a measure

Hi all,

 

I have a small example table (left).  It contains per country/category all available models with the according annual price.

I want a matrix table (result table) using measures with the minimum price (min price) per Country Category. This I already created succesfully.

Now I also want to show in a Measure (no calc. column or seperate summarize table!) the Model that is corresponding to to this minimal annual price (see Yellow part). So for Country BE with Category A, the cheapes price is 579 and this is model A4.

 

See below the dropbox link for the PBIX file.
Thanks in advance!

minimal value per category.jpg

 

 

https://www.dropbox.com/s/uerqf5i2xf61lkv/Minimum%20value%20per%20category.pbix?dl=0

1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

@model = VAR _Min =[min price]
RETURN
CALCULATE(MIN('dim Models'[Model]),FILTER(ALL('fact Lease'),[Price]=_Min))

View solution in original post

2 REPLIES 2
FilipFireFlyBI
Resolver I
Resolver I

ah indeed that is an easy solution. Thanks Ahmedx!

Ahmedx
Super User
Super User

@model = VAR _Min =[min price]
RETURN
CALCULATE(MIN('dim Models'[Model]),FILTER(ALL('fact Lease'),[Price]=_Min))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.