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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
wiktor_nus
Regular Visitor

ffilter two tables

Hello, I would like to filter two tables in the report, the tables have no relationship. In both tables there is a "date" field and I would like to put a filter on that it also affects the other table.

4 REPLIES 4
v-yalanwu-msft
Community Support
Community Support

Hi, @wiktor_nus ;

You could try it.

 

measure=calculate(Sum(Table1[Value]), filter(Table1, Table1[Date] in allselected(Table2[Date]) ) )

 

Or Can you post sample data as text and expected output?

The best way is create a measure to contorl two table without relationship.

 

Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Samarth_18
Community Champion
Community Champion

Hi @wiktor_nus ,

 

There are several ways:-

 

1. Put same filter on both the tables.

2. or Create a date table and join it with both the table and put filter on date table so it will filter other tables.

 

Thanks,

Samarth

Best Regards,
Samarth

If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Connect on Linkedin

amitchandak
Super User
Super User

@wiktor_nus , My advice would be to create a date table join with those two and use that as slicer

 

Or have measures like

 

calculate(Sum(Table1[Value]), filter(Table1, Table1[Date] in values(Table2[Date]) ) )

 

To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.

unfortunately they are connected by a different relation which does not allow for a connection after the date field.
unfortunately this measure does not work:
calculate(Sum(Table1[Value]), filter(Table1, Table1[Date] in values(Table2[Date]) ) )

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.