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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
Anonymous
Not applicable

Join Tables for a IF Statement

What is wrong DAX?

 

OverrideTermFlag = IF(FILTER(CROSSJOIN('Fact_Policy','Override New Term'),'Fact_Policy'[ChannelDate]='Override New Term'[ChannelDate]),"Y","N")
 
 
The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value.
 
12 REPLIES 12
harshnathani
Community Champion
Community Champion

Hi @Anonymous ,

 

Are your creating a new table, measure or column.

 

incase you are creating a table.

 

OverrideTermFlag = FILTER(CROSSJOIN('Fact_Policy','Override New Term'),'Fact_Policy'[ChannelDate]='Override New Term'[ChannelDate]))

this will join values where Fact Policy Date  = Override Channel Date.

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

I would like to a evaluation. If Join True

 

@Anonymous ,

 

 

OverrideTermFlag = IF(FILTER(CROSSJOIN('Fact_Policy','Override New Term'),'Fact_Policy'[ChannelDate]='Override New Term'[ChannelDate]), = ???? , "Y","N")

 

 

Marked in Blue is your Filter Function.

Marked in Red is What you need to add as  your evaluation parameter.

 

Hope this makes sense now.

 

Regards,
Harsh Nathani

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

Thanks

For you help 

I am getting this error message. In addition it did not let me do the condition you provide so I did not include it. 

 

OverrideNewTermFlag = IF(FILTER(CROSSJOIN('Fact_Policy','NewTermOverrideMatch'),'Fact_Policy'[DateChannel]='NewTermOverrideMatch'[DateChannel]),"Y","N")

 

The expression refers to multiple columns. Multiple columns cannot be converted to a scalar value. 

 

 

@Anonymous ,

 

This is because 

 

CROSSJOIN('Fact_Policy','NewTermOverrideMatch'),'Fact_Policy'[DateChannel]='NewTermOverrideMatch'[DateChannel]

 

returns a Table.

 

 

Can you clearly state what is your requirement to help you better. 

 

Please share sample data in text format.

 

Thanks,

Regards,

 

Anonymous
Not applicable

I just need to a create calculated field the flags on the 'FactPolicy' table that a record matched to the 'OverrideNew TermMatch' table.

@Anonymous ,

 

Are your tables related.

 

You can try using RELATED function.

 

Difficult to help without seeing your Data Model and some sample data.

 

Regards,

HN

Anonymous
Not applicable

Yes the 2 tables are related

 

Anonymous
Not applicable

I solved my problem with Related.

 

Thanks

 

Hi @Anonymous ,

 

Great that you solved the problem using RELATED.

 

Kudos will be highly appreciated.

 

Regards,

Harsh Nathani

@Anonymous ,

 

 

I have 2 tables which are related.

 

1.jpg2.JPG3.JPG

 

 

Regards,

Harsh Nathani
Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!! (Click the Thumbs Up Button)

Anonymous
Not applicable

Column

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

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.