Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
admin11
Memorable Member
Memorable Member

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

 

admin11_0-1616663478505.png

My PBI file :-

https://www.dropbox.com/s/z3w777jy4d8nynd/PBT_V2021_392%20TI_SI_GL%20rename%20TI%20with%20TT%20for%2...

 

Paul

1 ACCEPTED SOLUTION
v-yangliu-msft
Community Support
Community Support

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:

v-yangliu-msft_0-1617169135130.png

 

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.

View solution in original post

13 REPLIES 13
v-yangliu-msft
Community Support
Community Support

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:

v-yangliu-msft_0-1617169135130.png

 

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.

@v-yangliu-msft 

Thank you very much for your help , it work fine now. apprecaite very much.

Paul Yeo

v-yangliu-msft
Community Support
Community Support

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:

v-yangliu-msft_0-1617068974592.png

 

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.

@v-yangliu-msft 

 

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")
v-yangliu-msft
Community Support
Community Support

Hi  @admin11  ,

Here are the steps you can follow:

1. Create calculated column.

Column = SUBSTITUTE('Table'[SOURCE],"TI","TT")

2. Result:

v-yangliu-msft_0-1617005525564.png

 

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.

@v-yangliu-msft 

 

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 :-

admin11_0-1617020176907.png

 

Anonymous
Not applicable

Go to power query editor and use Replace Values button from transform

Kesha_Shah_0-1616664240851.png

 

@Anonymous 

That field is not availabel at PQ.

Paul

Anonymous
Not applicable

I can see it ina acreenshot sent by you.

Kesha_Shah_1-1616664584138.png

Look at the yellow highlighter.

amitchandak
Super User
Super User

@admin11 , Do it power query, Right click replace

https://www.youtube.com/watch?v=hkZhZbR7Kmk

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak

May i know how to do it at DAX , as SOURCE is not available at PQ. 

admin11_0-1616664141317.png

 

 

@admin11 , in DAX you can use substitute

https://www.youtube.com/watch?v=y5HvChhMWbQ

substitute ([Column], "TI", "TT")

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak 

Thank you very much for your help , i get error :-

By the way i have TS want to change to SS 

and TI change TT.

admin11_0-1616664712479.png

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.