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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
itsmeanuj
Helper IV
Helper IV

Pick only selected rows to create table visual

Hi,

 My data looks like this with few more columns as attributes.

ProductIDRankCall DateCall Status
A10111-JanFailed
A10122-Jansuccess
A10133-Janfailed
B10215-Janfailed
B10223-Jansuccess
B105110-Jansuccess
B105212-Janfailed

 

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.

 

ProductIDRankCall DateCall Status
A10111-JanFailed
B10215-Janfailed
B105110-Jansuccess

 

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

2 REPLIES 2
parry2k
Super User
Super User

@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.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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