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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
PwrBI01
Post Patron
Post Patron

Create a measure that shows the name of the minimum value of a related column

Hi guys,

 

I have the following table:

 

Imagen1.png

 

I want to create a measure that shows the name of the person that has the minimum ID, how can I do it?

 

Thanks in advance.

 

 

1 ACCEPTED SOLUTION

@PwrBI01 

It works for me. check your dataset if you have a blank in the Name column. 

Try this modified version

TOPN(1,FILTER(VALUES('Table'[Name]),'Table'[Name]<>BLANK()),CALCULATE(MAX('Table'[ID])),ASC)



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

4 REPLIES 4
Fowmy
Super User
Super User

@PwrBI01 

Try this measure:

Name_m =TOPN(1,VALUES(Table[Name]),CALCULATE(MAX(Table[ID])),ASC)
Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Hi @Fowmy, thank you for your answer,

 

If I use the measure you sent me I get Blank as a result, but if I change it into the opposite:

 

Name_m =TOPN(1,VALUES(Table[Name]),CALCULATE(MAX(Table[ID])),DESC)

 

I get the result Ricardo, do you know where can be the problem?

 

Regards.

 

@PwrBI01 

It works for me. check your dataset if you have a blank in the Name column. 

Try this modified version

TOPN(1,FILTER(VALUES('Table'[Name]),'Table'[Name]<>BLANK()),CALCULATE(MAX('Table'[ID])),ASC)



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

@Fowmy I checked the database and I didn't see any blank data. Anyway this modified version worked fine. 

 

Thank you.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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