Creating Date Dimension in Power Query

cr731

Well-known Member
Joined
Sep 17, 2010
Messages
611
I'm trying to create a dynamic date dimension using Power Query, as outlined in articles such as

https://www.powerquery.training/portfolio/dynamic-calendar-table/
https://blog.crossjoin.co.uk/2013/11/19/generating-a-date-dimension-table-in-power-query/

This comes very close, but the date dimension I want to build needs a few additional considerations:

- I have a fact table with a listing of dates, representing the Period. Therefore, they will always be the 1st of the month, such as 1/1/2016, 2/1/2016, 3/1/2016, etc.
- In my date dimension, I want the StartDate to be January 1 of the minimum year in my Period column of the fact table ... and I want EndDate to be December 1 of the maximum date in my fact table Period column
- I want the date dimension to increment by month, not day

I'm having a hard time modifying the queries in the articles above to meet these requirements. I was wondering if anyone could offer any advice?
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
Are you using Power Pivot in 2010? 2013? 2016? or Power BI? Are you going to need to use Time Intelligence functions?
 
Upvote 0
Excel 2013 with Power Query. I would be passing the results to Power Pivot and using Time Intelligence functions.

Thanks
 
Upvote 0

Forum statistics

Threads
1,216,106
Messages
6,128,863
Members
449,473
Latest member
soumyahalder4

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top