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
Comphez
New Member

Replace if criteria is met in another column

Hello everybody,
I have 2 columns in my file, column 1 contains "IDs" and column 2 "Names".
What I'm trying to tell the software is something like this:
If you find these different "IDs" in column 1 then replace with this "Name" in column 2.
I searched looking for a solution to this simple problem, but I wasn't able to find one 😞
1 ACCEPTED SOLUTION
v-haibl-msft
Employee
Employee

@Comphez

 

You can also try to create a new column with DAX formula as below.

Replace if criteria is met in another column_1.jpg 

 

Best Regards,

Herbert

View solution in original post

2 REPLIES 2
v-haibl-msft
Employee
Employee

@Comphez

 

You can also try to create a new column with DAX formula as below.

Replace if criteria is met in another column_1.jpg 

 

Best Regards,

Herbert

Habib
Responsive Resident
Responsive Resident

You can achieve this using below steps

 

  1. Add a new column and provide conditions that what you want to replace with your conditions will be like this
  2. Click on Conditional Column option
  3. Go to Edit Queries and move to "Add Column" Tab
  4. If IDs = ???? then new column = ??   else new column = Name
  5. Once you get new column with required results, you should hide Name column and should replace new column to Name

Please refer to below image for details on Conditional Column

 

conditional.png

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.