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.
I have a column where I would like to add a prefix to only those rows that have text.
What I have:
24
Blank
10
12
Blank
What I get when I add the prefix:
A24
A
A10
A12
A
What I want:
A24
Blank
A10
A12
Blank
I would like to keep the blank rows blank.
Could you please provide some guidance?
Solved! Go to Solution.
You have updated your comment 🙂
Anyways you can try below approch:-
A2with_prefix =
IF (
Trim(rvTX[Related Patient.A2Cd]) <> BLANK(),
"A" & rvTX[Related Patient.A2Cd],
BLANK()
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
I still ended up with an A in the Blank rows.
Could you please share what you have tried and what output you are getting?
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
I created a column with
Based on your requirement your code would be like this:-
A2with_prefix =
IF (
NOT ( ISBLANK ( rvTX[Related Patient.A2Cd] ) ),
"A" & rvTX[Related Patient.A2Cd],
BLANK()
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
That is what I tried.
You have updated your comment 🙂
Anyways you can try below approch:-
A2with_prefix =
IF (
Trim(rvTX[Related Patient.A2Cd]) <> BLANK(),
"A" & rvTX[Related Patient.A2Cd],
BLANK()
)
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Works great! Thanks!
HI @mmarchioni ,
You can create column with below code:-
with_prefix =
IF ( NOT ( ISBLANK ( prefix[Column1] ) ), "A" & prefix[Column1], BLANK () )
Thanks,
Samarth
Best Regards,
Samarth
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.