Forum Discussion
How to replace value label TI with TT for SOURCE field ?
Hi All
I have a field = SOURCE , The value label have TI , TS
I like to replace TI with TT and TS with SS
My PBI file :-
Paul
- Anonymous5 years ago
Hi admin11 ,
Here are the steps you can follow:
1. Create calculated column.
Column = SUBSTITUTE( SUBSTITUTE( SUBSTITUTE( SUBSTITUTE('Table'[Column1],"TA","A"), "TP","B"), "TI","C"), "TS","D")2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
13 Replies
- AnonymousNot applicable
Hi admin11 ,
Here are the steps you can follow:
1. Create calculated column.
Column = SUBSTITUTE( SUBSTITUTE( SUBSTITUTE( SUBSTITUTE('Table'[Column1],"TA","A"), "TP","B"), "TI","C"), "TS","D")2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- admin11
Memorable Member
Anonymous
Thank you very much for your help , it work fine now. apprecaite very much.
Paul Yeo
- amitchandak
Super User
admin11 , Do it power query, Right click replace
- admin11
Memorable Member
- amitchandak
Super User
admin11 , in DAX you can use substitute
https://www.youtube.com/watch?v=y5HvChhMWbQ
substitute ([Column], "TI", "TT")
- AnonymousNot applicable
Go to power query editor and use Replace Values button from transform
- admin11
Memorable Member
Anonymous
That field is not availabel at PQ.
Paul
- AnonymousNot applicable
I can see it ina acreenshot sent by you.
Look at the yellow highlighter.
- AnonymousNot applicable
Hi admin11 ,
Here are the steps you can follow:
1. Create calculated column.
Column = SUBSTITUTE('Table'[SOURCE],"TI","TT")2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- admin11
Memorable Member
Anonymous
Thank you very uch for your help , your code is working fine.
I also want to repalce TS with SS.
I try below code :-SOURCE_NEW = SUBSTITUTE('Source'[SOURCE],"TI","TT","TS","SS")I get error msg :-
- AnonymousNot applicable
Hi admin11 ,
Here are the steps you can follow:
1. Create calculated column.
Column 2 = SUBSTITUTE( SUBSTITUTE( 'Table'[Column],"TI","TT"), "TS","SS")2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- admin11
Memorable Member
Anonymous
Thank you very much for your support , your code work fine , but when i need add 2 more , again i get error , hope you can advise me how to work around .
SOURCE NEW =SUBSTITUTE(SUBSTITUTE('Source'[SOURCE],"TA","A"),"TP,"B"),"TI","C"),"TS","D")