cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PatrickByGecko
Resolver I
Resolver I

filtering from one date column of a table with an other date column from an other table.

Hello

Is it possible in a report to have a sync when filtering from one date column of a table/report with an other date column from an other table/report?

Underneath the two tables "Activites Mensuelles" and "Activites Non Reglees" have both a column "DATE MOUVEMENT".

I would like to filter dates on one of these DATE MOUVEMENT's column in left report and get the other DATE MOUVEMENT filtered too in Right report.

I tried to add a new index between the two tables but I got an error saying that this index was leading to problem with the previous indexes.

Thank you for your help!

🙂

 
 

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@PatrickByGecko , As Suggested by parry2K; the best way is that you create a common date table and join both the tables with the date of the date table and use date table for filter and display of dates.

 

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.

 

Other ways are

Calculate(Countrows('Activites Non Reglees'), filter('Activites Non Reglees'[DATE MOUVEMENT] in values('Activites Mensuelles'[DATE MOUVEMENT] )))

 

or use treatas

https://docs.microsoft.com/en-us/dax/treatas-function

https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@PatrickByGecko , As Suggested by parry2K; the best way is that you create a common date table and join both the tables with the date of the date table and use date table for filter and display of dates.

 

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.

 

Other ways are

Calculate(Countrows('Activites Non Reglees'), filter('Activites Non Reglees'[DATE MOUVEMENT] in values('Activites Mensuelles'[DATE MOUVEMENT] )))

 

or use treatas

https://docs.microsoft.com/en-us/dax/treatas-function

https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/

 

Did I answer your question? Mark my post as a solution! Appreciate your Kudos!! !!
Dashboard of My Blogs !! Connect on Linkedin
Want To Learn Power BI
Learn Power BI Beginners !! Advance Power BI Concepts !! Power BI For Tableau User !! Learn Power BI in Hindi !!
Proud to be a Super User!

View solution in original post

parry2k
Super User
Super User

@PatrickByGecko the best approach would be to add date dimension in your model, link it with both the table and then use the data from date dimension in your visual (which will be common for both) and everything will work as expected.

 

To add a date dimension, check my blog post here.

 

Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020

I would  Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!

Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.

 

 






Did I answer your question? Mark my post as a solution.

Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.





PatrickByGecko
Resolver I
Resolver I

Here is my screen sorry =>

AEffacer.jpg

Helpful resources

Announcements
2022 Release Wave 1 760x460.png

2022 Release Wave 1 Plan

Power Platform release plan for the 2022 release wave 1 describes all new features releasing from April 2022 through September 2022.

Power BI December 2021 Update_carousel 768x460.jpg

Check it Out!

Click here to read more about the December 2021 Updates!

Jan 2022 Dev Camp 768x460 copy.png

Power BI Dev Camp- January 27th, 2022

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors