Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I'm using the following approach to create roleplaying date tables and wanted to run it by you all for feedback.
Here's the scenario:
- I have a source data table that has OrderDate and ShipDate columns.
- I want a model with Order Calendar and Ship Calendar tables that relate each column respectively.
- The date tables should cover the same date range.
Solution:
- Create a Calendar query that generates a base date table for the desired range. Disable it from loading into the model.
- Create the Order Calendar and Ship Calendar queries which each reference the Calendar Query.
- Modify column names in those queries.
Sound reasonable?
Solved! Go to Solution.
Typically, I also prefer to create multiple tables in the Power BI model.
E.g., I create one query that generates a "base" date table. Then I duplicate it by creating more queries that simply reference the base date query, then change the names of the columns.
Because I want the different date dimensions to have different names, like "Order Date" (with "Order Year," "Order Month," etc.) and "Ship Date" (with "Ship Year," "Ship Month," etc.). I think this provides a lot of clarity, when you are showing dates on reports/dashboards. (And I don't think you can do this, if you use a single date table, with multiple relationships plus USERELATIONSHIP.)
I'm missing what you are trying to do. Normally, if I have a date table, I load that into my data model and then create relationships to it from the other tables in my date model.
The main challenge I'm trying to address is that I have a fact table with multiple date columns. If I just have one date table then that table can only be used to filter one of the columns in my fact table. In the Desktop app I can create multiple relationships and select which one I want to be active but in the web app this doesn't seem to be possible. And, even if it was it still wouldn't allow for different visualizations to be using different relationships.
For example if I want to have one chart that is "Average Customer Satisfaction for orders ordered on a weekend" and another chart that is "Average Customer Satisfaction for orders shipped on a weekend" I think I have to have two date tables...
Another role playing example, not date related, would be if I have a Flights table with Origin Airport and Destination Airport columns that both need to relate to an Airports table.
Does that make sense?
People are going to judge me, but when I get into those situations, I just create two tables from the same source via two queries and am done with it.
Don't judge me...
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
93 | |
86 | |
80 | |
69 | |
68 |
User | Count |
---|---|
226 | |
129 | |
119 | |
83 | |
77 |