Masking low value cell count
I have a dataset which contains sensitive person information that can be sliced by various demographic groups.

When I use PowerPivot to query it if I use more than say 5 groups the resulting value within a cell may fall below
an acceptable value of say 10 and render the group of people identifiable.

What I would like is some way to generate the lowest group such that any combination < 10 returns 10 and any hierarchy/group
above the detail uses this new value for its summary.

Here is an example of how it would look now (I have used only 3 groups Gender followed by Age group and Age to keep it simple):

Gender   Age group   Age Count
 Male                       32 
         20-25              30
                     21      9
                     24     10
                     25     11
         26-30               2
                     30      2

This is how I would like it to look:

Gender   Age group   Age Count
 Male                       <41 
         20-25              <31
                     21     <10
                     24     10
                     25     11
         26-30              <10
                     30     <10

I have actually tried to do it myself but the DAX expression is beyond me. I use ISFILTERED(<column name>) or HASONEVALUE
to get the lowest level group (Age) to work but of course I can't get the levels above it in the hierarchy to calculate
based upon the interim result... 

IF(HASONEVALUE(Measure[Age]),if([Count]>5,[Count],if(ISBLANK([Count]),0,5)),BLANK())
July 20th, 2015 5:20am

Hi Cantor001,

According to your description, you need to return Age count value as 10 if its value is less than 10, and then use it on high level high hierarchy, right?

In this case, you can first add another column to return 1 or 0. If Age count value is less than 10, return 1. Otherwise returns 0. And then sum up this column value on high level hierarch, if the sum value is more than 0, then you need to add a "<" on sum value. I have tested it on my local environment  the similar DAX expression below is for you reference.
=IF(case0721[CalculatedColumn2]>=0,"<","")&CALCULATE(sum(case0721[CalculatedColumn3]),ALLEXCEPT(case0721,case0721[Gender]))

https://msdn.microsoft.com/en-us/library/ee634825.aspx?f=255&MSPPError=-2147217396
https://msdn.microsoft.com/en-us/library/ee634795.aspx

Regards,

Free Windows Admin Tool Kit Click here and download it now
July 21st, 2015 2:36am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics