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
sv11
Helper I
Helper I

Tables Relationships

Hi,

 

I have 2 tables being pulled from different databases. 

 

I managed to connect them on a Unique ID - "ExtnID", and I am able to filter the report using this.

 

These 2 tables have a different Date column. And I need to have a Date slicer on my report too and when I use one of the date column, it does not filter the values from other table.

When I try to have a 2nd relationship (For Dates) Power BI throws an error asking me to deactivate the earlier relation to make this one active.

 

When I try a Date parameter, I cannot link both the tables to it.

 

Is there a workaround? Having both the filter on the report is the requirement. 

Appreceate the help.

 

Thanks you.

 

4 REPLIES 4
yelsherif
Resolver IV
Resolver IV

I suggest one of 2 solutions:

1. create a calculated table for combined dates, e.g:
dates = SUMMARIZE(UNION(table1,table2),[date])

Then link this table to both data tables with the date column in both. set filtering direction as single. you can then apply filter to the "dates" table created above.

 

2. depending on the consistency of dates in both tables, you can still create an inactive relation between the two tables directly and use special DAX expressions to activate this relation when needed, e.g: 
calculate(count(table1[ID]), USERLATIONSHIP(table1[date],table2[date]))

@yelsherif Thank you for your suggestion.

 

In your 2nd proposed solution, is it possible to activate this relation by using a date slicer?

v-yulgu-msft
Employee
Employee

Hi @sv11,

 

Please set the "Cross filter direction" to Both for a test.

1.PNG

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-yulgu-msft,

 

The default selection is "Both" for cross-filter selection. The issue still exists.

 

Is there any other getaround?

Thank you for your help.

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.