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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors