Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

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.

  • Anonymous's avatar
    Anonymous
    3 years ago

    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.

4 Replies

  • KNP's avatar
    KNP
    Icon for Super User rankSuper User

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

     

     

    Can you show us a screen shot of your model?

    I suspect there's something else going on.

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      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.

      • KNP's avatar
        KNP
        Icon for Super User rankSuper User

        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.