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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the September 2025 Power BI update to learn about new features.