Forum Discussion
Anonymizing certain data / Dynamic data masking
- 1 year ago
Hi Royel
You can follow @Royel’s approach if the goal is to mask data in a table or matrix visual. However, when the masked data must function as a dimension, you’ll need a more creative method. This would involve creating a table that contains all possible combinations of the current user’s email with the emails of other users. If the two email columns from this crossjoin match, return the actual username; otherwise, return something like Employee xxxx - the rows to return depend on the logged in user.
The attached PBIX file contains two approaches. In my testing, the disconnected table method performs faster, though actual results may vary depending on your semantic model.
Hi Royel
You can follow @Royel’s approach if the goal is to mask data in a table or matrix visual. However, when the masked data must function as a dimension, you’ll need a more creative method. This would involve creating a table that contains all possible combinations of the current user’s email with the emails of other users. If the two email columns from this crossjoin match, return the actual username; otherwise, return something like Employee xxxx - the rows to return depend on the logged in user.
The attached PBIX file contains two approaches. In my testing, the disconnected table method performs faster, though actual results may vary depending on your semantic model.