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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
Anonymous
Not applicable

Replace if

There are data clean up required. I want to replace the status in the column "return reason" from FPC to FPR where the column "Model" is equal to "S123". Any advice?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , A new column in DAX

if([return reason] = "FPC" && "Model" = "S123" , "FPR", [return reason] )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

Such as amitchandak said ,you could use replace value. 

and if you want to change a column and don't want to add a new column, may be you must complete it in power query.

One method is replace the value;

Another method is add a condition column then delete the original column.

vyalanwumsft_0-1653376414955.pngvyalanwumsft_1-1653376425821.png
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous , A new column in DAX

if([return reason] = "FPC" && "Model" = "S123" , "FPR", [return reason] )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Creating a new column is not my plan.

@Anonymous , Then you need to do it power query , refer

https://community.powerbi.com/t5/Desktop/Replace-value-in-Power-Query-based-on-condition/td-p/1367325

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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