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! Learn more

Reply
Anonymous
Not applicable

Is there a method to prevent PowerBI visual displaying results when record count is under 5?

I have a real world problem that has me stumped. I have a powerBI report that is list of employee survey answers. Before I share it with the firm, I need to make sure that no individual can be identified by simply playing with the slicers ("Marketing director in California hates management... we only have one marketing director in California).

Is there a function or a workaround I can use to either prevent the visuals from updating when the count of records is below 5 or to display a message "count of records too low, broaden your selection.

1 ACCEPTED SOLUTION
parry2k
Super User
Super User

@Anonymous try this on your end: add a new measure:

 

Total Count = COUNTROWS ( Table )

 

on visual, add a visual level filter with the above measure and select where greater than 5, if you slice the data and the number of records is less than 5, your visual will go blank. We can figure out the message part later.



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.

View solution in original post

7 REPLIES 7
parry2k
Super User
Super User

@Anonymous oh! Thanks for your comments. Glad it worked out. Cheers!!



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.

parry2k
Super User
Super User

@Anonymous try this on your end: add a new measure:

 

Total Count = COUNTROWS ( Table )

 

on visual, add a visual level filter with the above measure and select where greater than 5, if you slice the data and the number of records is less than 5, your visual will go blank. We can figure out the message part later.



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.

Anonymous
Not applicable

You are my hero today.

parry2k
Super User
Super User

@Anonymous ok, so what is our expectation from that excel file? What I'm doing with it? If you provide a bit more details, it will help.



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.

Anonymous
Not applicable

The excel file has a list of survey responses. What I am trying to prevent is someone using the slicer to narrow down the results to less than 5 and be able to indentify the individual who provided the response. 

 

My desired outcome is that if the slicer selections result in a visualization output with less than 5 records the visualization is hidden, an alert is displayed ("please expand your selection") or any other method that would prevent the viewer from seeing result set of bellow 5 records. 

parry2k
Super User
Super User

@Anonymous can you share sample data and expected output, you can surely create a count measure and then put a visual level filter on this measure and say > 5 but without looking at data model it is hard to tell what would be the measure.

 

 



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.

Anonymous
Not applicable

Yes, thank you. Sample recordset (15 records) I uploaded to dropbox as an excel file:

https://www.dropbox.com/scl/fi/zv98pk78rrjbs2qrmdkco/sample.xlsx?dl=0&rlkey=xz5jtky2ppqc89nq7zx150gv...

 

And this is how my slicer/viisual looks: https://imgur.com/a/rAOxtCh

 

Any help is greatly appreciated. 

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