Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
Hi Power BI Community,
I'm currently working on a project where I have a table visual displaying columns for Account, Name, Amount, and a custom column called SH. In this custom column, I have certain values, let's say 'xy', that I want to replace with '***' for the corresponding Account, Name, and SH columns, but I want to keep the Amount column unaffected.
Here's what I'm looking to achieve:
| Account | Name | Amount | SH |
|---------|------|--------|----|
| 123 | John | $100 | xy |
| 456 | Jane | $150 | ab |
| 789 | Alex | $200 | xy |
Expected Result:
| Account | Name | Amount | SH |
|---------|------|--------|----|
| *** | *** | $100 | *** |
| 456 | Jane | $150 | ab |
| *** | *** | $200 | *** |
Could someone guide me on how to achieve this in Power BI? Any help or suggestions would be greatly appreciated!
Thank you in advance!
Solved! Go to Solution.
Hi @Chelly ,
First of all, many thanks to @amitchandak for your very quick replies.
Please try below steps:
1. below is my test table
Table:
2. create measure with below dax formula
MEASURE =
VAR cur_sh =
SELECTEDVALUE ( 'Table'[SH] )
RETURN
IF ( CONTAINSSTRING ( cur_sh, "xy" ), "***", cur_sh )
Measure 2 =
VAR cur_sh =
SELECTEDVALUE ( 'Table'[SH] )
RETURN
IF (
CONTAINSSTRING ( cur_sh, "xy" ),
"***",
SELECTEDVALUE ( 'Table'[Account] )
)
Measure 3 =
VAR cur_sh =
SELECTEDVALUE ( 'Table'[SH] )
RETURN
IF ( CONTAINSSTRING ( cur_sh, "xy" ), "***", SELECTEDVALUE ( 'Table'[Name] ) )
3. add a table visual with measure and field
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Chelly ,
First of all, many thanks to @amitchandak for your very quick replies.
Please try below steps:
1. below is my test table
Table:
2. create measure with below dax formula
MEASURE =
VAR cur_sh =
SELECTEDVALUE ( 'Table'[SH] )
RETURN
IF ( CONTAINSSTRING ( cur_sh, "xy" ), "***", cur_sh )
Measure 2 =
VAR cur_sh =
SELECTEDVALUE ( 'Table'[SH] )
RETURN
IF (
CONTAINSSTRING ( cur_sh, "xy" ),
"***",
SELECTEDVALUE ( 'Table'[Account] )
)
Measure 3 =
VAR cur_sh =
SELECTEDVALUE ( 'Table'[SH] )
RETURN
IF ( CONTAINSSTRING ( cur_sh, "xy" ), "***", SELECTEDVALUE ( 'Table'[Name] ) )
3. add a table visual with measure and field
Please refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 64 | |
| 43 | |
| 30 | |
| 27 | |
| 23 |
| User | Count |
|---|---|
| 135 | |
| 114 | |
| 58 | |
| 39 | |
| 35 |