Forum Discussion
Using a measure to get the second highest value - complementary suppression
Hi v-piga-msft
I was actually finally able to figure it out.. I appreciate your follow up!
So my goal was to "suppress" the next smallest value in the series when it would otherwise only suppress a single value.. when shown with a total could be easily reverse engineered..
Example series: 10, 4, 7
Suppression Criteria: any value less than 5
So in this case with regular suppression we get: 10, <5, 7.. if shown with the total of 21 it wouldn't take much to figure out what the <5 represents.
Using the Rank function we can apply an asecending order to the series like so:
10 : 3
4 : 1
7 : 2
Next we use an if statement that evaluates when the Rank is "2" checking for if the corresponding value is greater than or less than 5.. If the value is greater than 5 we need complimentary suppression, if it is less than 5 it would be suppressed so we don't need to worry.
Here is the final output:
10,
<5,
Complimentary Suppressed
Now this paired with the total cannot (easily) be reverse engineered for the individual values.
Could you post the dax code? I need to do the same. Thank you