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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.