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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.