Forum Discussion
Date Slicer for multiple columns in different tables
I'm new in the BI and Power BI world, I'm creating a PoC in PowerBI. My data sources are all scattered, mainly on spreadsheets, and I'm also pulling data from Google Analytics.
In one of my tables and in the Google Analytics data I have a date field, that is completely unrelated. However, I would like to include a date slicer for the page, so that the user can see the numbers on those dates. The numbers visualized are not related, one is coming from an app DB and the others are related to Google Analytics.
So, in order to filter all the page based on one date slicer, I would have to connect them in some fashion which I still don't know what would be the best way to achieve it. Or will I have to code my own slicer?
Thanks!
Hi jhorta,
You need to create a Calendar table and them make a relationship between the tables that way you canuse the calendar table to make the visuals / slicers you need and all the information will be transform based on that.
On this post you can find several ways to create a calendar but if you google "POWER BI Calendar" you will find lots of different ways to create a calendar table.
Just as a best pratice be sure that the calendar table is starting on 1 January and ending on 31 December (this can be different years)
Regards,
MFelix
9 Replies
- MFelix
Super User
Hi jhorta,
You need to create a Calendar table and them make a relationship between the tables that way you canuse the calendar table to make the visuals / slicers you need and all the information will be transform based on that.
On this post you can find several ways to create a calendar but if you google "POWER BI Calendar" you will find lots of different ways to create a calendar table.
Just as a best pratice be sure that the calendar table is starting on 1 January and ending on 31 December (this can be different years)
Regards,
MFelix
- jhortaFrequent Visitor
Alright, sounds like I have some more research to do. Thanks!!
- rbwidenerFrequent Visitor
Hi jhorta, I am having a similar issue and have created a Calendar table, but cannot seem to get the relationships to work. I two data tables from different source systems and I'm trying to create a single date filter (month/year) on my visualization page. The data tables have similar data, like order numbers, created date/time, dispatched date/time, completed date/time, etc. I've checked the data types of all the columns and they seem to be the same. Any ideas on what I'm doing wrong? Any feedback would be greatly appreciated.
- MFelix
Super User
Hi rbwidener,
You are trying to make more than 1 connection between date table and the other tables correct?
You need to make inactive relationships between the several dates and then create calculated measures using the USERRELATIONSHIP formula to active the relationship upon context.
Regards,
MFelix