Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
My data looks like this with few more columns as attributes.
| Product | ID | Rank | Call Date | Call Status |
| A | 101 | 1 | 1-Jan | Failed |
| A | 101 | 2 | 2-Jan | success |
| A | 101 | 3 | 3-Jan | failed |
| B | 102 | 1 | 5-Jan | failed |
| B | 102 | 2 | 3-Jan | success |
| B | 105 | 1 | 10-Jan | success |
| B | 105 | 2 | 12-Jan | failed |
I have created a measure below to calculate the distinct count of Product & ID.
Measure =
var tbl = SUMMARIZE(ALLSELECTED(Data),Data[PRODUCT],Data[ID],"Min Rnk", MIN(Data[rank]))
var result = CALCULATE(DISTINCTCOUNT(Data[ID]), TREATAS(tbl,Data[PRODUCT],Data[ID],Data[rank]))
return result.
This is working absolutely fine. Now I want to create a table visual that would interact with the above measure and pick the row with the minimum rank for each product, and ID combination. here is the output I need in the table. in short the count in the above measure should match with the number of rows in the details table.
| Product | ID | Rank | Call Date | Call Status |
| A | 101 | 1 | 1-Jan | Failed |
| B | 102 | 1 | 5-Jan | failed |
| B | 105 | 1 | 10-Jan | success |
Please note this needs to be dynamic as we have a call date slicer at the top. so if the user filters out all the dates before 2-Jan, then product A with rank 2 and its respective values in other columns would be selected.
Can you please help me create this in PBI
Thanks,
Anuj
@itsmeanuj I think you have already solved it, the measure you created if you use it in a visual level filter where measure is not blank and that will do it.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Thanks @parry2k . It worked. Do you know how we can add a row at the end for the total count of rows in this specific scenario? e.g in the above scenario it should say total = 3.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.