Forum Discussion
Creating Power BI slicer by combining 2 date/time fields from 2 different dataflows
I would like to create a date slicer (filter) in my Power BI report. This slicer should combine 2 date/time fields from 2 different dataflows so that when we start filtering, not only 1 column (example timesheet dataflow) in the matrix visual adjusts but also the 2nd column (example leaves dataflow).
I have already tried working with a new global table 'Date' with an autogenerate date field in it. Then we created relations to our 2 different dataflows (timesheet & leaves) allowing us to use the autogenerate field in the slicer. But unfortunately, this doesn't work as some online tutorials say.
How do I solve this problem best?
10 Replies
- Idrissshatila
Super User
Hello Lh_8900 ,
the method of creating a global date table is the best solution, but why it didn't work in your case, what was the isseu ?
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote for my Community Mobile App Idea 💡 - Lh_8900New Member
This is my model view as the settings of my relationships.
Date field in table Date has the DAX formule of "Date = CALENDARAUTO()"
If I add field Date as a slicer and select for example Last 1 weeks. I have no input, table is blank. If I remove the filter then I see my values
- Idrissshatila
Super User
Lh_8900 ,
so the solution for this is that go to power query and convert the data type of these columns to date instead of data time and it should work.
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote for my Community Mobile App Idea 💡- Lh_8900New Member
Idrissshatila I have changed the column 'Date' from Timesheets and 'DateFrom' from Leaves to data type 'Date' but it doesn't work with this solution. My table is still blank if I filter 😕
Are there other things I should watch/check?