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
APeaEyes
Frequent Visitor

Using One Slicer to Filter Date Fields Across Multiple Tables

Hello All,

 

I have a time/labor report that references four tables... these tables are joined by employeeID. Each table has a date field related to the specific timesheet transaction. Since I have joined these tables on Employee ID, I cannot create active joins to these tables by date field. 

 

Please provide some guidance on how I could use a single slicer to filter all existing date fields for the same date range?

 

What I've tried so far is:

1. Created auto calendar, joined the date fields from each table to the date field in the auto calendar and used the auto calendar date field in the slicer. Results: Does not work.

 

2. Attempted to create a relationship on the date field between the tables but unable to do that due to existing joins.

 

Thanks,

greatly appreciated in advance.

1 ACCEPTED SOLUTION
APeaEyes
Frequent Visitor

I figured out a very simple solution which is to just add each of the date fields from each dataset to the same slicer group and that works very well.

View solution in original post

4 REPLIES 4
KNP
Super User
Super User

The correct approach is to have a date table (don't forget to mark it as a date table) and join on that.

 

KNP_0-1678905892179.png

 

Can you show us a screen shot of your model?

I suspect there's something else going on.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
APeaEyes
Frequent Visitor

I figured out a very simple solution which is to just add each of the date fields from each dataset to the same slicer group and that works very well.

I'm glad you've solved your problem.

 

It's worth noting, this data model is not following recommended design and dealing with dates that way is not scalable/future proof.

I would recommend reading up on star schemas if you want to build robust solutions.

 

Have I solved your problem?
Please click Accept as Solution so I don't keep coming back to this post, oh yeah, others may find it useful also ;).
chrome-9xf-Zagzel-B

If you found this post helpful, please give Kudos.
It gives me a sense of instant gratification and, if you give me Kudos enough times, magical unicorns will appear on your screen.
If you find my signature vaguely amusing, please give Kudos.
KIfp67uy-Sr
Proud to be a Super User!PBI-Super-User-Rank-30x30-1x
APeaEyes
Frequent Visitor

Thank you @KNP. I absolutely agree! For now I've been working with what I've been provided but have expressed some challenges with modelling the data in a more efficient, way. Since it's historical data that has now become static (point in time data, that will not change), scalability is not required.

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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