Forum Discussion

PowerBeeEye's avatar
PowerBeeEye
Microsoft Employee
6 years ago
Solved

Conditional column based on value from another table with matching values

I have two tables: Servers Server_Name   Server_OS   Server_Latest_Patch Server_1       Windows Server 2016       KB123 Server_2       Windows Server 2019 ...
  • v-yingjl's avatar
    6 years ago

    Hi PowerBeeEye ,

    You can create a calculated column using the below dax formula:

    Critical_Patch_Installed =
    IF (
        'Servers'[Server_OS] IN DISTINCT ( 'Critical_Patch'[OS] ),
        IF (
            'Servers'[Server_Latest_Patch] IN DISTINCT ( 'Critical_Patch'[KD_ID] ),
            "Yes",
            "No"
        ),
        "No"
    )

     

    Best Regards,
    Yingjie Li

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