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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Abdel-2024
Frequent Visitor

DAX command

Hi,

How can I create the following excel formual in new column (W/Wo_QC) between 2 columns (Opp_ID) & (LOA_ID) in different tables  using DAX in Power Bi

 

    =IF(ISNA(VLOOKUP(L2,QC!AV:AV,1,FALSE)),"Without","With")

 

6 REPLIES 6
tamerj1
Super User
Super User

Hi @Abdel-2024 

=
IF ( Table1[Opp_ID] IN Table2[LOA_ID], "With", "Without" )

Hi, Thanks but still  it is not working 

1st both columns contains text

2nd same text (string) is repeated in several rows in each column 

sOpportunity_ID

22.KE.301258
22.KE.301258
22.KE.301258
22.KE.301258
22.KE.301258
22.KE.301258
22.TZ.293595
22.TZ.304520
22.TZ.293595
22.TZ.293595
22.TZ.293595
22.TZ.293595

 

 

LOA_ID

22.KE.301258
22.TZ.293595
22.TZ.304520
22.TZ.293595
22.KE.301258
22.KE.301258
 
 
 
 
 
 

@Abdel-2024 

Oh! my mistake. Please try

=
IF ( Table1[Opp_ID] IN VALUES ( Table2[LOA_ID] ), "With", "Without" )

 

still not working I belive we need to use the following DAX formula , however it gives me below error although there is link between the 2 tables The column

 

IF(ISBLANK(LOOKUPVALUE( CSP_Automation[QC number],CSP_Automation[QC_Opp_ID],RELATED(WBSMapping[Opportunity_ID]))),"with")

 

=='WBSMapping[Opportunity_ID]' either doesn't exist or doesn't have a relationship to any table available in the current context.==

 

Abdel2024_0-1683725011817.png

 

@Abdel-2024 

Are you creating a calculated column or a measure? My code is supposed to be a claculated column.

I need to create new column to check/lookup if the text in Opp_ID column (Table1) is existing  in LOA_ID column in Table2 , if yes it will return "with" if not return "witout"

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.