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
Anonymous
Not applicable

Problem in Comparing Two Columns

Hi all,

 

I'm facing a problem with comparing to columns.

 

so what basically happens when I create a conditional column is that it compares a row with it corresponding row in the other column.

however, I need to compare a single values from the first column with all values fro the second column until it finds a match, else "New"

Noor_Rahmeh_0-1615960986079.png

I will add an example just to clarify it more.

if "web Developer" ( in 'Actual Jobs') = 'Career Path Jobs' 

then 'Career Path Jobs' 

Other "New" 

 

But as I said, it only compares a singles row while I want it to iterate on all 'Career Path' Column until it finds a match.

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 

Create the following column: 

Column = IF([Actual Jobs] in VALUES('Table'[Career Path Jobs]),[Actual Jobs],"New")
 
The downside is if the job name is not exactly same in both columns, they cannot be detected. For example, there are 2 spaces in the "Account  Manger" in Column 2, but only 1 space in Column 1. As the result, it returns "New" because they are not matching. You might want to update the list to prevent such differences.

column 1 and 2.JPG

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
V-pazhen-msft
Community Support
Community Support

@Anonymous 

Create the following column: 

Column = IF([Actual Jobs] in VALUES('Table'[Career Path Jobs]),[Actual Jobs],"New")
 
The downside is if the job name is not exactly same in both columns, they cannot be detected. For example, there are 2 spaces in the "Account  Manger" in Column 2, but only 1 space in Column 1. As the result, it returns "New" because they are not matching. You might want to update the list to prevent such differences.

column 1 and 2.JPG

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
amitchandak
Super User
Super User

@Anonymous , Try a new column like

 

if(not(isblank(LOOKUPVALUE([Actual Jobs], [Career Path Jobs],[Actual Jobs]))),"New" ."Career Path Jobs")

 

or

 


new column =
var _1 =[Actual Jobs]
return
if( countx(filter(search(_1,[Career Path Jobs],,0)>0),[Career Path Jobs])+0=0,"New" ."Career Path Jobs")

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
Anonymous
Not applicable

@amitchandak  

I tried applying those two solutions but they are comparing Career Pth jobs colomns with itself.

Noor_Rahmeh_0-1615963367957.png

 

@Anonymous ,Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

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
Anonymous
Not applicable

@amitchandak 

Yes, sure!

https://drive.google.com/file/d/1wUp8rbTvrO1qLaVb0BE-bZhRyIC7sq5f/view?usp=sharing

 here is a link to the excel sheet 

mainly the concept is when there is a match between the first and the second coloumn then write the 'Career path job'

else write "New"

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!

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.