Anonymous's avatar
Anonymous
Not applicable
2 years ago
Status:
Done

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

3 Comments

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    Try changing z to the following expression:

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

     

     

    Best regards,
    Community Support Team_ Scott Chang

  • Anonymous's avatar
    Anonymous
    Not applicable

    that's it. Thanks a lot!

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    I am very happy to have solved your problem.

     

    Best regards,
    Community Support Team_ Scott Chang