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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@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")

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

@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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.