Forum Discussion
mmarchioni
Helper I
5 years agoAdd Prefix to only rows in column with text
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?
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() )
8 Replies
- Samarth_18
Community Champion
HI mmarchioni ,
You can create column with below code:-
with_prefix = IF ( NOT ( ISBLANK ( prefix[Column1] ) ), "A" & prefix[Column1], BLANK () )Thanks,
Samarth
- mmarchioni
Helper I
I still ended up with an A in the Blank rows.
- Samarth_18
Community Champion
Could you please share what you have tried and what output you are getting?
- mmarchioni
Helper I
I created a column with
A2with_prefix =IF ( NOT ( ISBLANK ( rvTX[Related Patient.A2Cd] ) ), "A" & rvTX[Related Patient.A2Cd], BLANK () )And still got A's in the rows that were blank. The columns are formatted as text and not numbers (I am not sure if that makes a difference).