cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
moshiera Frequent Visitor
Frequent Visitor

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.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Vvelarde Super Contributor
Super Contributor

Re: True/False IF statement on two different tables

@moshiera

 

Hi, assuming that both tables are related.

 

New Calculated Column: 

 

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

 

Regards

 

Victor

Lima - Peru




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




View solution in original post

2 REPLIES 2
Vvelarde Super Contributor
Super Contributor

Re: True/False IF statement on two different tables

@moshiera

 

Hi, assuming that both tables are related.

 

New Calculated Column: 

 

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

 

Regards

 

Victor

Lima - Peru




Lima - Peru
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!




View solution in original post

Microsoft v-huizhn-msft
Microsoft

Re: True/False IF statement on two different tables

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

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors