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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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.

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.