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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.