cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
ezequiel Regular Visitor
Regular Visitor

Get opposite relation

Hi,

 

I have 2 tables. The first contains names from a company and dates (first days of weeks) and the second contains all the employees from that company. Example:

 

Table 1

 

Name      Date

------       ------

John         8/12/2019

Peter        8/12/2019

Anna        8/12/2019

Anna        8/5/2019

 

Table 2

 

Name

-------

John

Peter

Anna

Joyce

 

What I need to to get those names that don't appear depending on the date selection. Example: If I filter by 8/12/2019, I should get 'Joyce'. If I filter by 8/5/2019, I should get 'Joyce','Peter' and 'John'. 

 

Can you guys please help me on how to achieve that?

 

Thanks

 

Ezequiel

1 ACCEPTED SOLUTION

Accepted Solutions
Super User I
Super User I

Re: Get opposite relation

It's a measure, so it really doesnt matter which table you "create" it in. So  you just want to go to Modeling-New Measure. 

Measures.png

View solution in original post

3 REPLIES 3
Super User I
Super User I

Re: Get opposite relation

You can use the except function:

Measure = 
CONCATENATEX(
    EXCEPT(Name2,SELECTCOLUMNS(NameDate,"Name", NameDate[Name])),Name2[Name],UNICHAR(10))

Except Function.png

ezequiel Regular Visitor
Regular Visitor

Re: Get opposite relation

@Nick_Mthis looks like the resolution. I'm new to powerBi, so I must ask you where this measure should be created? within the first or the second table?

 

Thanks!

Super User I
Super User I

Re: Get opposite relation

It's a measure, so it really doesnt matter which table you "create" it in. So  you just want to go to Modeling-New Measure. 

Measures.png

View solution in original post

Helpful resources

Announcements
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.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors