Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Display if not found

I have two tables.

 

Table K027 Status is returning 17 distinct "Work Order" numbers.

Table "TJ" has two columns, "Work Order Number" and "Location".  There will be multiple rows with the same work order number.

 

Of the 17 distinct work orders in Table K027, I want to display the work orders that are not found in Table "TJ" and of the work orders that are found in Table "TJ", do not display them if the word Complete is in the "Location" column.

 

And, do I have the tables join properly for what I'm trying to accomplish?

 

Please advise.  I'm sorry, I do not know how to submit sample data.  If someone wants to direct me to a page that will show me how to submit sample data on this site, I will learn.

Capture.PNG

1 ACCEPTED SOLUTION

Hi @Anonymous

 

To create a calulcated table, click the New Table button on the modeling tab.

 

calculated table.png

 

This creates a new table in DAX but leaves your original tables intact.  Useful for a bunch of reasons.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

6 REPLIES 6
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @Anonymous

 

Just checking your logic here

 

"Of the 17 distinct work orders in Table K027, I want to display the work orders that are not found in Table "TJ" and of the work orders that are found in Table "TJ", do not display them if the word Complete is in the "Location" column."

 

You only want to display work orders from K027 if they don't exist in TJ.  That would mean you wouldn't show any work orders that exist in TJ regardless of what the location column carries..


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

K027 has wo# 123, 456, 789

TJ has:

wo# 123 - location "B"

wo# 789 - location "Complete"

 

 

I want the following to be returned:

wo# 123  - because is was found in TJ, but "Complete" was not found in "location"

wo# 456  - because is was not found in TJ

 

wo# 789 would not be returned because it was found in TJ and also had Complete in the "Location"

 

In essence, I want to return every work order number that is not Complete.  If it finds it in TJ, but not complete, return it.  If it is not found in TJ, it is not complete because it has not even had time to be entered on the report to get started.  Hope this makes sense.  

 

Hi @Anonymous


This calculated table gets close to what you need

 

Table = 

VAR T1 = VALUES('K027 Status'[Work Order])
VAR T2 = SUMMARIZECOLUMNS('TJ'[Work Order Number],FILTER('TJ',[Location]="Complete"))
RETURN EXCEPT(T1,T2)

except.png

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

Thanks for your help on this,  I don't know how to insert a calculated table but I added a measure following your example.  Here is my error.  TJ might have two with the same wo#.  If it does and either one of them does not have location "complete", I need it shown.

 

Example:

TJ table:

wo# 123  location: 1

wo# 123  location: Complete

 

I would want wo# 123 to be returned because one line is still not complete.

 

 

Capture.PNG

Hi @Anonymous

 

To create a calulcated table, click the New Table button on the modeling tab.

 

calculated table.png

 

This creates a new table in DAX but leaves your original tables intact.  Useful for a bunch of reasons.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

Perfect.  It worked.  THANK YOU!!

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Top Solution Authors