Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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.
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
89 | |
52 | |
48 | |
46 |