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

Group withouth duplicates

Hi all. I would like to create a list called WIP. I have 3 querys - all IDs, than another called warehouse and one shipped. I would like to remove the warehouse and the sipped parts ID from the "all ID" list to get the production parts.E.g:

 

IDs , 11,22,23,25,27,28,30,33,35  Warehouse: 28,27,25,   Shipped: 23,22,11  = WIP : 30,33,35  (a-b-c=d)

 

What would be the best method?

 

Thank you in advance

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Group withouth duplicates

Hi @Tommyvhod 

You can do that with EXCEPT( ) and UNION( ). Assuming ID, Warehouse and Shipped are tables:

1. All columns must have the same name, so rename, for example,  to ID[ID], Warehouse[ID] and Shipped[ID]

2. Create a new calculated table (one column with your list):

WIP =
EXCEPT (
    DISTINCT ( ID[ID] ),
    UNION ( DISTINCT ( Warehouse[ID] ), DISTINCT ( Shipped[ID] ) )
)

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

View solution in original post

1 REPLY 1
Highlighted
Super User
Super User

Re: Group withouth duplicates

Hi @Tommyvhod 

You can do that with EXCEPT( ) and UNION( ). Assuming ID, Warehouse and Shipped are tables:

1. All columns must have the same name, so rename, for example,  to ID[ID], Warehouse[ID] and Shipped[ID]

2. Create a new calculated table (one column with your list):

WIP =
EXCEPT (
    DISTINCT ( ID[ID] ),
    UNION ( DISTINCT ( Warehouse[ID] ), DISTINCT ( Shipped[ID] ) )
)

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Cheers  Datanaut

View solution in original post

Helpful resources

Announcements
Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

October 2019 Community Highlights

October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.

New Solution Badges

New Solution Badges

Two waves of brand new solution badges are coming! Read the article for more information on our new community badges.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 6 members 1,054 guests
Please welcome our newest community members: