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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
steambucky
Helper III
Helper III

Replace all different values except one

I have a column of data

 

Cat

Dog

Mouse

ANIMAL UNKNOWN

ANIMAL UNKNOWN

ANIMAL UNKNOWN

 

I want to replace everything except ANIMAL UNKNOWN TYPE with ANIMAL TYPE KNOWN.

 

I have far more than 3 types of animals - actually about 100. There loads of examples for getting rid of specific text but i can't find anything that gets rid of everything BUT a specific thing.  If you can help, the less coding or DAX stuff, the better. I am but a humble noob.  

 

Thanks in advance.    

1 ACCEPTED SOLUTION
RahulYadav
Resolver II
Resolver II

Hi @steambucky,

You can use below dax formula to solve your problem.

 

Resived Name = if(Animals[Name]<>"ANIMAL UNKNOWN","ANIMAL TYPE KNOWN",Animals[Name]) 

Thanks,

Rahul

View solution in original post

2 REPLIES 2
RahulYadav
Resolver II
Resolver II

Hi @steambucky,

You can use below dax formula to solve your problem.

 

Resived Name = if(Animals[Name]<>"ANIMAL UNKNOWN","ANIMAL TYPE KNOWN",Animals[Name]) 

Thanks,

Rahul

Thank you! This worked perfectly for me.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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