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
Varshi288
Resolver I
Resolver I

Compare data by columns

Hi All ,

I have merged two tables Salesboost where I am comparing GUID from both the tables.that is achieved from below DAX query.
Now I need to compare GUID along with country from two tables from the second query but getting error like "Multiple columns cannot be converted to a scalar value." any help?


Q1:

SalesBoost1&2 = IF(SalesBoost[Account: GUID]=SalesBoost[SalesBoost2.Customer GUID],"1&2",
IF(ISBLANK(SalesBoost[Account: GUID]),"2",
IF(ISBLANK(SalesBoost[SalesBoost2.Customer GUID]),"1")))

Q2:

CC_GUID_1 = 
var SB = CONCATENATE(SalesBoost[Account: GUID],SalesBoost[Country])
VAR SB1 = CONCATENATE(SalesBoost[SalesBoost2.Customer GUID],SalesBoost[SalesBoost2.Country])
return
IF(SB=SB1,"1&2",
IF(ISBLANK(SB),"2","1"))

1 REPLY 1
harshnathani
Community Champion
Community Champion

@Varshi288 ,

 

Not very clear to understand unless you share sample Data.

 

Follow the below article on the error.

 

https://www.sqlgene.com/2019/04/30/dax-error-the-expression-refers-to-multiple-columns-multiple-colu...

 

Also, try using the SEARCH OR FIND Function.

 

https://dax.guide/find/

https://dax.guide/search/

 

Regards,

Harsh Nathani

 

Did I answer your question? Mark my post as a solution! Appreciate with a Kudos!!

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.