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

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
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.

Top Solution Authors