Forum Discussion

allenind's avatar
allenind
Frequent Visitor
5 years ago
Solved

Help with comparing each row to a column in a different table

I am trying to create a calculated column that compares one column to another column in a different table, I want to compare the version of the applications installed in different computers so I can monitor if the computers are up to date or not. Here are how my tables look like:

 

Table 1:

 

APPLICATION NAMEVERSIONCOMPUTERNAME
Adobe Acrobat Reader DC19.010.20069COMPUTER1
Google Chrome87.0.4280.141COMPUTER1
Microsoft Edge87.0.664.75COMPUTER1
SnagIt12.4.0COMPUTER1
Adobe Acrobat Reader DC18.010.20069COMPUTER2
Google Chrome85.0.4280.141COMPUTER2
Microsoft Edge84.0.664.75COMPUTER2
SnagIt11.4.0COMPUTER2

 

Table 2:

 

APPLICATION NAMEVERSION
Adobe Acrobat Reader DC19.010.20069
Google Chrome87.0.4280.141
Microsoft Edge87.0.664.75
SnagIt12.4.0
Microsoft Visual Studio10.0
Python Launcher3.82

 

Expected Outcome:

 

APPLICATION NAMEVERSIONCOMPUTERNAMECOMPLIANCY CHECK
Adobe Acrobat Reader DC19.010.20069COMPUTER1COMPLIANT
Google Chrome87.0.4280.141COMPUTER1COMPLIANT
Microsoft Edge87.0.664.75COMPUTER1COMPLIANT
SnagIt12.4.0COMPUTER1COMPLIANT
Adobe Acrobat Reader DC18.010.20069COMPUTER2NOT COMPLIANT
Google Chrome85.0.4280.141COMPUTER2NOT COMPLIANT
Microsoft Edge84.0.664.75COMPUTER2NOT COMPLIANT
SnagIt11.4.0COMPUTER2NOT COMPLIANT

 

I have trouble coming up with the dax formula or code for this as I am quite new to powerBI. Any help would be appreciated! Thanks so much! 

  • allenind 

    You can add the following as a new column in Table 1. My Table 1 and 2 are T-1 and T-2, replace accordingly.

    COMPLIANCY CHECK = 
    IF( 
        ISEMPTY(
            FILTER(
                'T-2',
                'T-2'[APPLICATION NAME] = 'T-1'[APPLICATION NAME] &&
                'T-2'[VERSION] = 'T-1'[VERSION]
            )
        ),
        "NOTCOMPLANT",
        "COMPLANT"
    )

    ________________________

    If my answer was helpful, please click Accept it as the solution to help other members find it useful

    Click on the Thumbs-Up icon if you like this reply 🙂


    Website YouTube  LinkedIn

     

1 Reply

  • allenind 

    You can add the following as a new column in Table 1. My Table 1 and 2 are T-1 and T-2, replace accordingly.

    COMPLIANCY CHECK = 
    IF( 
        ISEMPTY(
            FILTER(
                'T-2',
                'T-2'[APPLICATION NAME] = 'T-1'[APPLICATION NAME] &&
                'T-2'[VERSION] = 'T-1'[VERSION]
            )
        ),
        "NOTCOMPLANT",
        "COMPLANT"
    )

    ________________________

    If my answer was helpful, please click Accept it as the solution to help other members find it useful

    Click on the Thumbs-Up icon if you like this reply 🙂


    Website YouTube  LinkedIn