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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
brabby_dabby
Frequent Visitor

Mask Data Based on Dynamic Slicer Selection

Hello,

 

I have some data in a 'raw_data' table that has Customer information:

NameMonthIncidence
Bill1.98
Bill2.96
Bob1.88
Bob2.81
Brian1.91
Brian2.82

 

And I have another table that creates an Alias:

NameAlias
BillCustomer 1
BobCustomer 2
BrianCustomer 3

 

My goal is to build a dashboard that has a slicer in which I am able to select a name. So, if I select 'Bob' in the slicer, then the dashboard will mask all other names to the 'Alias'[Alias] value so Bill will show up as 'Customer 2' and Brian as 'Customer 3'.

 

I've seen articles that show me how to anonymize data. But I only want to partially anonymize because I want to see the name I select, but the alias for the other names. And I don't think I want row level security because I want to see all the data, but just mask it based on which slicer I select.

 

Any help would be greatly appreciated.

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @brabby_dabby ,

 

Please check if this is what you want:

 

1. Add an Index column into "Customer" table to show all rows in the table visual.

 

2. Don't create active relationships between "Cusomer" and "Alias" table.

 

3. Create a measure.

Measure =
IF (
    MAX ( Customer[Name] ) = SELECTEDVALUE ( Alias[Name] ),
    SELECTEDVALUE ( Alias[Name] ),
    LOOKUPVALUE ( Alias[Alias], Alias[Name], MAX ( Customer[Name] ) )
)

 

4. Result:

alias.gif

 

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Icey
Community Support
Community Support

Hi @brabby_dabby ,

 

Please check if this is what you want:

 

1. Add an Index column into "Customer" table to show all rows in the table visual.

 

2. Don't create active relationships between "Cusomer" and "Alias" table.

 

3. Create a measure.

Measure =
IF (
    MAX ( Customer[Name] ) = SELECTEDVALUE ( Alias[Name] ),
    SELECTEDVALUE ( Alias[Name] ),
    LOOKUPVALUE ( Alias[Alias], Alias[Name], MAX ( Customer[Name] ) )
)

 

4. Result:

alias.gif

 

 

 

Best Regards,

Icey

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.

Top Solution Authors