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
rsderidd
Frequent Visitor

Selective Mask usable on axis

Hello!

 

I have a similar scenario as 

https://community.fabric.microsoft.com/t5/Desktop/Mask-Data-Based-on-Dynamic-Slicer-Selection/m-p/17...

 

However the main difference is that I want to use the selective masked value on an axis.. Which the supplied solution cannot do since it is a measure.

 

To be a little more exact, I have 3 tables in my attempt:

raw_data - this has the actual details we are interested in, with a customer ID field.  linked to the customer table on ID.

customer - this has the customer name and ID. I have added a new 'column' onto it, to calculate a masked_name based on the customer's id.  Simple calc eg: 

masked_name = CONCATENATE("Customer ", LEFT(customer[party_id],5))
 
and my third table is just a second copy of the customer table, disconnected though - no link to the raw_data, and no masked_name column added. I renamed this table customer_mask_exception_select
 
My hope is that i can slicer on the customer_mask_exception_select table to select the name I want to see, and have all other data masked.
For example, a Simple bar chart on the raw_data table, showing total Incidence per Customer.
 
I almost got there.. by adding a measure to the Customer table, as :
masked_selective_name = IF( SELECTEDVALUE(customer_mask_exception_select[name]) = SELECTEDVALUE(Customer[name]) , SELECTEDVALUE(Customer[name]), SELECTEDVALUE(Customer[masked_name] ))
 
But there are a couple problems with this:  
1. i can't use the measure on an axis. Though it works when i put it on a simple table visual.
2. it shows up as blank on the table visual even, unless I also display the masked_name.  LIkely just due to how i'm handling that masked_selective_name calculation using SELECTEDVALUE on everything. I'm a little new, so still playing with things.
 
Any help appreciated.  I took a look at 
as well.. but its a little confusing, and I think only works if I have a small known set of specific values, rather than my dynamic list of possible masked_names to show.
 
2 REPLIES 2
rsderidd
Frequent Visitor

thanks for the explanation.. i'll read it a couple more times to let it sink in 😉

v-jingzhang
Community Support
Community Support

Hi @rsderidd 

 

The axis only accepts a column rather than a measure, meanwhile the values in a column are fixed and cannot be dynamically changed by slicers or filters. So I think the requirement to use the selective masked value on an axis cannot be met currently. 

 

When you add the measure into a table visual, it displays when there is the masked_name column because the table visual accepts both columns and measures as Values in it. When the masked_name column is in the same table visual, it passes a filter to the measure in its current context so the measure can get only one specific value for each masked name on each row. However when no column is in the table visual, the measure is evaluated based on the whole table so SELECTEDVALUE cannot find a distinct value in the current context. Instead it returns the default value blank, as a result you see it show up as blank on the table visual. 

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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!

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