Forum Discussion

moshiera's avatar
moshiera
Frequent Visitor
8 years ago
Solved

True/False IF statement on two different tables

Let me explain what i'm trying to do and maybe there is an easier way of doing this...

 

Table: Vulnerability

Vul      System

x2123     xyzlaptop

x5252    xyzlaptop

x1235    abclaptop

x3421    deflaptop

Table: Disabled Systems

System

xyzlaptop

deflaptop

 

I want my report to only report on systems that have not been already disabled.  Becuase i've already disabled the systems that have a vulnerability. So I thought I could just to a new comlumn if statmenet =IF vulnerability [system] = Disabled Systems [system],"True","False") However i just keep getting an error that what ever in the Disabled systems field can't be found because i'm trying to create the column in the vulnerability table...   Any help is greatly appreicated.

 

  • moshiera

     

    Hi, assuming that both tables are related.

     

    New Calculated Column: 

     

    Disabled = IF(COUNTROWS(RELATEDTABLE('Disabled System'))>0,"Yes","No")

     

    Regards

     

    Victor

    Lima - Peru

2 Replies

  • Vvelarde's avatar
    Vvelarde
    Community Champion

    moshiera

     

    Hi, assuming that both tables are related.

     

    New Calculated Column: 

     

    Disabled = IF(COUNTROWS(RELATEDTABLE('Disabled System'))>0,"Yes","No")

     

    Regards

     

    Victor

    Lima - Peru

  • v-huizhn-msft's avatar
    v-huizhn-msft
    Microsoft Employee

    Hi moshiera,

    Please create relationship between the tables if there is no connection. Then follow the solution Vvelarde posted, please give feedback when there is other issue.

    Thanks,
    Angelia