Forum Discussion

AlanP514's avatar
AlanP514
Post Patron
4 years ago
Solved

Dax error

 

Hai All, please help me to solve this error, 
I am trying to create a flag, but these two tables are in an inactive relationship,

The logic is if the ambassador's name is present in the t1 table then yes otherwise no  but these two tables are in inactive mode 
and I am getting this error so how to solve this error please help me 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi  AlanP514 ,

    I created some data:

    Ambassador:

    T1:

    Here are the steps you can follow:

    1. Create calculated column.

    Column =
    var _column=SELECTCOLUMNS('T1',"1",'T1'[User Name])
    return
    IF(
        'ambassador'[Name] in _column ,"Yes","No")

    2. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

2 Replies

  • Syk's avatar
    Syk
    Resident Rockstar

    The USERELATIONSHIP function needs 2 columns so it should look like...

    USERELATIONSHIP('Ambassador'[Ambassador Email],'T1 Data Base'[User Email])

     

     

    Although I don't believe this will get you what you're looking for. Are you trying to create a calculated column with this?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  AlanP514 ,

    I created some data:

    Ambassador:

    T1:

    Here are the steps you can follow:

    1. Create calculated column.

    Column =
    var _column=SELECTCOLUMNS('T1',"1",'T1'[User Name])
    return
    IF(
        'ambassador'[Name] in _column ,"Yes","No")

    2. Result:

     

    Best Regards,

    Liu Yang

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly