cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Conditional Column from Two Different Tables

I have two tables.

Table A - A list of all locations that have ever existed and the data related to that location.
Table B - A list of all locations that have ever existed, with a column on the current status of that location. (Open, Closed, or New)

I need Table A to only show me data about sites that are currently OPEN or NEW. I dont care if the site is closed.

I have tried appending Table B to Table A but it only adds a bunch of null rows for the duration of Table A, after which it adds the Data for Table B, nulling out the columns for Table A.


I'm not sure how to do this but it seems like a relatively simple task to accomplish.
Please let me know if there is any further information I could provide.

 

Table A

 

SitesSubnetsIPs
10021.1.11.1.1.250
10041.1.21.1.2.250
10051.1.31.1.3.250
10061.1.41.1.4.250
10071.1.51.1.5.250
10081.1.61.1.6.250
10101.1.71.1.7.250
10111.1.81.1.8.250
10141.1.91.1.9.250
10151.1.101.1.10.250
10161.1.111.1.11.250
10171.1.121.1.12.250
10181.1.131.1.13.250
10211.1.141.1.14.250
10221.1.151.1.15.250
10231.1.161.1.16.250
10251.1.171.1.17.250
10261.1.181.1.18.250
10271.1.191.1.19.250
10311.1.201.1.20.250
10321.1.211.1.21.250
10331.1.221.1.22.250
10351.1.231.1.23.250
10371.1.241.1.24.250
10381.1.251.1.25.250
10391.1.261.1.26.250
10401.1.271.1.27.250
10411.1.281.1.28.250
10431.1.291.1.29.250
10441.1.301.1.30.250
10451.1.311.1.31.250
10461.1.321.1.32.250
10471.1.331.1.33.250
10491.1.341.1.34.250
10501.1.351.1.35.250
10511.1.361.1.36.250
10541.1.371.1.37.250
10551.1.381.1.38.250

 

 

Table B

RestaurantWan_Status
1001Closed
1002Closed
1004Closed
1005Complete
1006Closed
1007Complete
1008Complete
1009Closed
1010Closed
1011Closed
1012Closed
1014Complete
1015Complete
1016Complete
1017Closed
1018Complete
1020Closed
1021Complete
1022Complete
1023Complete
1025Complete
1026Complete
1027Complete
1031Closed
1032Complete
1033Complete
1034Closed
1035Closed
1037Complete
1038Complete
1039Complete
1040Complete
1041Complete
1043Complete
1044Complete
1045Complete
1046Complete
1047Complete
3 REPLIES 3
Highlighted
Super User I
Super User I

Re: Conditional Column from Two Different Tables

@SeanLiles42 

 

Could you provide a sample data of two tables and what is the key to join them?

Preferable an excel format instead of image..

Connect on LinkedIn
Highlighted
New Member

Re: Conditional Column from Two Different Tables

I'm unable to upload any files to a file sharing website but i've added some sample data to my original post. 

Highlighted
Microsoft
Microsoft

Re: Conditional Column from Two Different Tables

@SeanLiles42 

It seems they are related by the sites and restaurant, you could create the expected table with this formula:

 

Table = CALCULATETABLE(VALUES('Table A'),FILTER('Table B',[Wan_Status]<>"Closed"))

 

 

Paul Zheng

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

Helpful resources

Announcements
May 2020 Community Highlights

May 2020 Community Highlights

It’s time for another PBI Community recap!

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Using the Community

Using the Community

Need help with the Power BI Community? Our 'Using the Community' support articles are a great place to start.

Galleries

Galleries

Looking for inspiration on how to present your data? Need instructional videos? Check out our Galleries!

Top Solution Authors