Quantcast
Channel: Service topics
Viewing all articles
Browse latest Browse all 61951

Complimentary suppression of cells in matrix/table with low/small/minimum n-size requirements

$
0
0

Hi all, I work in a public institution where it is required to hide/suppress/censor data when there are too few observations/cases/samples, after a user has applied some filters. In my case, we want to suppress any data which could lead to exposure of any cells with n counts <= 3.

 

Imagine the following table, with no protection:

Male: 6
Female: 4
Non-Binary: 2
Total: 12


I can suppress individual cells with n <= 3, with something like:

SuppressLowN= IF(CALCULATE(SUM('table'[column]),'table'[column]=1) > 3, CALCULATE(SUM('table'[column]),'table'[column]=1),"(Low N)")


However, this results in the following inadequately protected table, from which it easy to deduce the total number (2) of Non-Binary persons:

Male: 6
Female: 4
Non-Binary: (Low N)
Total: 12


Alternatively, I can also hide the entire row, using something like this:

SuppressLowN = IF(CALCULATE(COUNTROWS('table'), ALLEXCEPT('table', 'table'[column])) <= 3, 1, "Low N" )

...but this means that the "Total" column is also hidden, which is unacceptable.

 

It would be acceptable, but not preferable, to hide all but the total, like this (acceptable solution #1):

Male: (Low N)
Female: (Low N)
Non-Binary: (Low N)
Total: 12


However, it would be most preferable to hide at least 2 columns and leave all others exposed, whenever encountering low Ns, as follows (see solution: https://community.powerbi.com/t5/Desktop/Using-a-measure-to-get-the-second-highest-value-complementary/m-p/661289#M317678) (acceptable solution #2):

Male: 6
Female: (Complimentary Suppressed)
Non-Binary: (Low N)
Total: 12


Can someone help me with acceptable solution #1 or #2? Solution #2 is preferred, but I'm having trouble with the first step described as "verifies that there is only one value being suppressed in the series [Needs Compliment]"; I need help designing this logic.

 

If more information is needed, please read the first paragraph on the second page of this link to see why we sometimes need to "suppress the next largest subgroup" (complimentary suppression) in tables with few observations: https://dataqualitycampaign.org/wp-content/uploads/2017/06/DQC-N-size-paper-FINAL.pdf

 

I apologize for the wordiness but want to make it easier for others to search for this problem. Thank you for your help!


Viewing all articles
Browse latest Browse all 61951

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>