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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ezequiel
Employee
Employee

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
Anonymous
Not applicable

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
Anonymous
Not applicable

You can use the except function:

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

Except Function.png

@Anonymousthis 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!

Anonymous
Not applicable

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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