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
Anonymous
Not applicable

Exclude low numbers of demographics for ranked individuals

Hi,

 

I have a complicated (for me) problem I can't wrap my head around.

 

I am anoymously ranking (RANKX) academic researchers by the sum of the grant value they are bringing into a university setting, and showing their demographics across different charts. Sum of the value of the grants they're on is on the Y axis, their rank based on their grant value on the X. There are several copies of the same chart with demographic legends on each chart. Each chart is accessed by a bookmarked button (see screenshot below). When a department is selected (department drop down not visible in the screenshot) and has less than a certain number of members in a minority, I need those persons in the minority to be hidden from the visual, so that they cannot be personally identified by their demographics. This needs to happen across all charts - if they were left in one chart, not being part of a minority for that demographic, but removed in another, you could potentially identify individuals from the charts they fall into and out of. So if someone falls into a single minority demographic, they need hiding from all demographic charts.

 

I think I need to enact a count of the numbers of individuals in a demographic, and if the count is below a threshold, say 5, remove those counted individuals from the visuals. This needs to hold true if you are selecting a department, or a faculty (so people previously excluded at department level end up included at faculty level, because there's more people in a given demographic at faculty level).

 

I have created a very simplified version of my model in a PBI file here: https://drive.google.com/file/d/1tFmTw9_TzfP463WKTYQUvCS2qZ30XiCv/view?usp=sharing.

 

In this file, for the sake of the example, I would want to hide the orange individuals, as there's 2 or less in each chart - so both females, and people with a disability, are hidden from these charts for this department. They would need to reappear at faculty level (not included in this example file).

 

Any help would be greatly appreciated.

 

Report screenshotReport screenshot

2 REPLIES 2
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

You can create a measure similar to below. Add it to the visual as a filter and set it to show items when value is 1. In the screenshot below, the light blue dots disappear because their group member count is smaller than the threshold. 

Flag = 
VAR _threshold = 3
VAR _value = SELECTEDVALUE(Person[Disability])
VAR _groupCount = COUNTROWS(FILTER(ALLSELECTED(Person), Person[Disability] = _value))
RETURN
IF(_groupCount < _threshold, 1, 0)

vjingzhang_0-1665046793176.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Anonymous
Not applicable

Hi,

Thanks so much for the help. I can see how this should work, and it works in the PBI file (obviously), but when I apply it to my real model it doesn't work.

In the screenshot below, you can see it's classing both disabled and not as one thing (0). Interestingly, I apply a filter for grant amount (award amount) of >0 to remove the entries from the bottom of the dataset (seen in the table on the right). When I remove that filter, the flag does then class these as 1. So it's something to do with how it's reading the disability column? (It's comparing blanks and not blanks or something, rather than 'Yes' to 'No')

 

Report Screenshot.PNG

 

 

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.

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.