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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Nishantp
Regular Visitor

Prevent filtering if returning row count is below a certain number

Hello,

I am a decently seasoned PowerBI user. I am creating some advanced reports for my client. And here is where I am stuck...I am not sure if this is even possible, hence asking the broader community.

 

We have an employee feedback report with bunch of various filters such as age, gender, minority, city, etc. Client wants to make sure the data always stays anonymous. And they fear that a manager can filter in a way that they can pretty much filter down the results to less than 5 records which will allow them to (in many cases) pin point the individual employee. 

 

Solution - I want to limit the filter usage where the manager can keep filtering but when the count of the returning dataset goes down to 10...we stop anymore filtering. Not sure how I can do this dynamically as there can be SO many permutations and combinations across 8 filters that we have. 

 

Any ideas if it is even possible to count the # of returning rows at every filter selection and if the total is less than 10 then don't let them filter.

5 REPLIES 5
v-gizhi-msft
Community Support
Community Support

Hi,

 

After my much test, i think there is no function to reach your requirement completely.

It is because measure can not memory the order of filter behavior.

You can create an idea here:

https://ideas.powerbi.com/forums/265200-power-bi-ideas 

 

Best Regards,

Giotto

amitchandak
Super User
Super User

@Nishantp ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I can't figure out how to upload the pbix file...hence sharing the link to the report here  -

https://app.powerbi.com/view?r=eyJrIjoiMWFmMmQyNTQtMTU1My00Mjg4LThmM2UtZDE2Yzc1MWUwNTQxIiwidCI6IjgwZ... 

@amitchandak 

Attached is the PBIX file. 

There are 149 total members and if you filter them by say age range <20 then 28 members are returned which is okay. If you further filter say for City and select phoenix and Seattle then 12 members return which is okay too. But if you select only seattle then 6 members are returned which is not okay. Same way if I did age range <20 and race as hispanic only 7 members are returned which is not okay.

 

Point is I want to allow users to filter through the report but if the filter or any combination of the filters are resulting in less than 10 members than they are not allowed to filter. Thsi is for preventing anonymity of the member as in our case employees are providing feedback but the manager can smart and filter down to 1-2 results and identify who the employee must be which can be an issue. 

 

 

Did you ever figure out a way to filter this way (prevent filter combinations from displaying results when records are under a certain number of records)?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.