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

Compare two columns inside same table and result with Yes or No

Hi,

 

I am trying to do a basic VLOOKUP between two columns and the result should be YES or NO. This is easily possible in Excel. Need your help in Power BI.

 

I have a two columns as shown below Ticket ID and Problem ID. I would like to search the Ticket ID in the Problem ID column (If it exists anywhere in Problem ID column). If yes then we need a new third column like below which should say Yes / No for Ticket ID column.

 

I want this resultant third column inside the same Table and not as a new calculated table. Need your help please

 

Ticket IDProblem IDYes / No
11Yes
2 No
3 Yes
43No
5 Yes
65No
1 ACCEPTED SOLUTION
v-yulgu-msft
Employee
Employee

Hi @Anonymous ,

 

New a calculated column with below DAX:

Yes/NO = IF(LOOKUPVALUE(Table2[Problem ID],Table2[Problem ID],Table2[Ticket ID])=BLANK(),"No","Yes")

6.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
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

2 REPLIES 2
ryszardre
Frequent Visitor

The formula above doesn't work! Look at the marked rows:

ryszardre_0-1657781438771.png

@v-yulgu-msft - could you please verify and help?

v-yulgu-msft
Employee
Employee

Hi @Anonymous ,

 

New a calculated column with below DAX:

Yes/NO = IF(LOOKUPVALUE(Table2[Problem ID],Table2[Problem ID],Table2[Ticket ID])=BLANK(),"No","Yes")

6.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.