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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
kmckenzie
New Member

Data Masking with Dynamic M Query

I am attempting to mask confidential data (Customer Names) to show how Customer A stacks up vs Customer B and so on.

 

I currently have a list of Customers with the Sanitized Customers.

 

Ex:  

CustomerSanitized
MicrosoftCustomer A
AppleCustomer B
GoogleCustomer C

 

I would like to be able to show Microsoft's data as "Microsoft" when presenting data to them specifically, while all others are using generic Customer A, B, etc.

 

I believe this can be done using Dynamic M Query Parameters but am currently finding difficulty writing the query.

 

Any help is appreciated.  Thanks!

1 ACCEPTED SOLUTION
v-henryk-mstf
Community Support
Community Support

Hi @kmckenzie ,

 

According to your description, I refer to a blog where you can randomize the data during the refresh in Power Query to achieve the effect of blocking the data you don't want to show.

vhenrykmstf_0-1646101741542.png

 

For more details, you can read related blog link as below:

Masking confidential data in Power BI reports - DataChant


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

2 REPLIES 2
v-henryk-mstf
Community Support
Community Support

Hi @kmckenzie ,

 

According to your description, I refer to a blog where you can randomize the data during the refresh in Power Query to achieve the effect of blocking the data you don't want to show.

vhenrykmstf_0-1646101741542.png

 

For more details, you can read related blog link as below:

Masking confidential data in Power BI reports - DataChant


If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.


Best Regards,
Henry


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

lbendlin
Super User
Super User

That's not what dynamic query parameters are for. Their purpose is to help with query performance optimization.

 

I would (strongly) recommend that you do your data masking in the upstream systems, and that you present different reports based on different dataset to your different audiences.  Trying to do all this in Power BI is inviting trouble and will lead to data leaks.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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