Forum Discussion

Vinothkumar's avatar
Vinothkumar
Frequent Visitor
10 years ago

DAX how to accept multiple values

HI,

 

I am trying to get user companies from user table to pass it to company table using username. (user will have multiple compnay id).

 

Company[companyid] = FILTER(User, User[UserName] ="xxxxxx",User[CompanyId])

 

 

Any suggestions how to do it. Thanks.

4 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Can you post a sample of your data? But, if I understand what you are going for, I expect that it will involve VALUES and CONCATENATEX.

  • Eric_Zhang's avatar
    Eric_Zhang
    Microsoft Employee

    I am trying to get user companies from user table to pass it to company table using username. (user will have multiple compnay id).

     

    Company[companyid] = FILTER(User, User[UserName] ="xxxxxx",User[CompanyId])

     

    Any suggestions how to do it. Thanks.


    Vinothkumar

     

    It seems the user table and company table are in One:Many relationship. If proper relationship is created, you don't have to concern how to filter the companyid by username.

     

    Regarding how to accept "multiple" values, if you're talking about a measure, you can use CONCATENATEX function.

     

    Please be more specific on your scenario.