Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Lookup Value with a filter on another table

Hi together, 
I have to check if  in the table "data_Current" the email is matching with an email in the table "users" and it should only match when the User in the table "users" does have an model "IOS" or "Android" in table "devices".

Table Current_Data

EmailImeiUsername
[email protected]1234test.1
[email protected]12345test2
[email protected]123456test2

[email protected]

nulltest3

[email protected]

1212test100

 

Table Devices

User-IDIMEISERIAL NumberModel
112345abcdeAndorid
222222abceAndroid
334333aaaaIOS
333456aaaaeDell
412345ertssdDell
5111111asdasIOS

 

Table Users:

USER-IDEMAILName
1[email protected]Meyer
2[email protected]Lampe
3[email protected]Anton
4[email protected]Magda
5[email protected]Meyer

 

My suggestion would be to create a new column in the table current_data if the email[current_data] is in the table [users] and has a model ("Android" or "IOS") in Table [devices].

The solution should be:

EmailImeiUsernameNEW COLUMN
[email protected]1234test.1Yes
[email protected]12345test2No
[email protected]123456test2No

[email protected]

nulltest3Yes

[email protected]

1212test100Yes

3 Replies

  • smpa01's avatar
    smpa01
    Icon for Community Champion rankCommunity Champion

    Anonymous  difficult to resolve without looking at the data but can you give this a try and let me know

     

     

    Measure = calculate(MAXX(FILTER(current,current[Email]=
    calculate(max(user[userEmail]),filter(devices,device[model]="IOS"||device[model]="android"))),current[Email]),userelationship(current<column>,user<column>,both)))

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi, unfortunately this does not solve the problem. I rather imagine a new column like this statement.

      Migrated = IF(ISBLANK(LOOKUPVALUE(devices[imei],devices[imei],'Data_Current'[IMEI])),"No","Yes")
  • Hi Anonymous ,

    According to your description, here’s my solution.

    1.Your three tables should have relationship.

     

    2.Create the new column like this.

     

    Best Regards,
    Community Support Team _ kalyj

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