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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
NathanD
Regular Visitor

Hide Dynamically datas in a matrix

Hello Everyone, yes i've already posted yesterday about a similar problem but did explain i think i oversimplified my problem and it resulted in helpful people answering beautifully my question but it did not solve my problem 

 

To explain my problem i'm working on a Dashboard that displays interesting numbers about education. I'm working with several filters and the data is quite sensible. I want to be able to put what we call in France the "Statistic Secret" to prevent anyone to find specifically people that succeeded/ or not, at their diploma. 

 

The usual way is to mask any data that could lead someone to identify 5 people or less. 

So that is what i want to do and here is the matrix i want to apply it on. 

NathanD_0-1730801862107.png

 

As you see it is a matrix with 2 levels, "GFE" and "Title of diploma", i will call them Group and SubGroup. 

For the two integer(not the %) columns that i will name columnA and columnB that is what i want to do:

 

-If there is one value <5 in column A or B, mask both value (so the value <5 cannot be calculated via the %)

 

-If there is only one subGroup in a Group that has his values masked. Mask another SubGroup values in the Group (so it cannot be calculated via the subtotal of the Group) 

 

-if there is only one Group that has his values masked, mask another Group values (So the initial Group values cannot be calculated with the total) and all of his SubGroup values (So the second Group masked cannot be reconstituted)

 

 

On this example all the datas are in the same table but i have other pages of the Dashboard where there are matrixes that joins multiple tables like diplomas name are on a different table than the values

 

I'm very thankful if someone can solve this problem as it is tearing myself up !

Have a nice day

 

 

 

 

1 REPLY 1
MattAllington
Community Champion
Community Champion

My general advice is this; work out how you would solve this in Excel if you had this problem, then apply the same approach here. 

Convert your measures to use variables, if you haven't already. 

measure A= VAR result = <your code>
RETURN result

 

with the above layout, you can write new code that tests for your criteria (either A or B return 5 or less)

 

measure A = 
VAR resultA = <your A code>
VAR resultB= <your B code>

RETURN if(resultA <=5 || resultB<=5,BLANK(),ResultA)


* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.

Top Solution Authors