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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

0

Dax Error when using IN oprator

I need to using Dax to get a total volume by zipcode with total group total volume >0. I can achive with following Dax

var s = ADDCOLUMNS(VALUES(Dim_Store[store_zip]),"vol",[_Chain CY Carton])
var z = FILTER(s, [vol]>0)    
 
The variable z should give me a table with zipcode that have total volume >0. I then need to find a list of stores from a different table with matching zipcode. The dax below give me the error msg said "the number of arguments is invalid. Function CONTAINSROW must have a value for each column in the table expression". Any ideas what this error msg mean and how can I fix it? (I am working sematic model in fabric)
var x = FILTER(Dim_TA_Store,Dim_TA_Store[store_zip] in z)
 
Thanks in advance.
 
Wenchi Wang
Status: Delivered

Hi @wenchi ,

 

I am very happy to have solved your problem.

 

Best regards,
Community Support Team_ Scott Chang

Comments
v-tianyich-msft
Community Support
Status changed to: Investigating

Hi @wenchi ,

 

Try changing z to the following expression:

var z = SELECTCOLUMNS(FILTER(s,[Vol]>0),[Vol])

vtianyichmsft_0-1728548485176.pngvtianyichmsft_1-1728548497687.png

 

 

Best regards,
Community Support Team_ Scott Chang

wenchi
Helper I

that's it. Thanks a lot!

v-tianyich-msft
Community Support
Status changed to: Delivered

Hi @wenchi ,

 

I am very happy to have solved your problem.

 

Best regards,
Community Support Team_ Scott Chang