The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi guys,
I have the following table:
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.
Solved! Go to 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)
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@PwrBI01
Try this measure:
Name_m =TOPN(1,VALUES(Table[Name]),CALCULATE(MAX(Table[ID])),ASC)
⭕ 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)
⭕ 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.