Forum

Dates Table 4.13 Qu...
 
Notifications
Clear all

Dates Table 4.13 Questions

7 Posts
2 Users
0 Reactions
88 Views
(@alib40)
Posts: 113
Estimable Member
Topic starter
 

What is the purpose of the index column?

Can I save the query in order to use it in any project book?

Is it possible to make the dates always be 5 years in front of todays date - if yes, how?

 
Posted : 15/12/2018 6:17 pm
(@mynda)
Posts: 4762
Member Admin
 

Hi Alison,

The Index column numbers the days in your Calendar table, it's optional. If you don't need it then I'd leave it out.

Session 4.21 explains the options for sharing/reusing queries.

In regards to the dates being 5 years in front of today's date, do you mean the last date in the table is 5 years from today, or do you want to increase all dates in your table by 5 years?

I should point out that it's not a good idea to store data in your workbook that isn't yet required, so unless you're storing 5 years worth of forecast data then I wouldn't advise extending your dates 5 years from today.

Mynda

 
Posted : 15/12/2018 11:09 pm
(@alib40)
Posts: 113
Estimable Member
Topic starter
 

The dates to be 5 years in advance.   So my date table starts at 1/1/15 and will run to 15/12/2023

 
Posted : 16/12/2018 3:09 am
(@alib40)
Posts: 113
Estimable Member
Topic starter
 

Re index column.  Why would I need it?  What scenarios would it be used in?

 
Posted : 16/12/2018 3:11 am
(@mynda)
Posts: 4762
Member Admin
 

Hi Alison,

There are various examples of the Index column being used throughout the Power Query course. If you have further questions on Index columns once you've completed the course please let me know.

You can use the Date.AddYears function to add 5 years to your Max date.

Mynda

 
Posted : 16/12/2018 3:25 am
(@alib40)
Posts: 113
Estimable Member
Topic starter
 

Looking at the solution you have sent for my previous version question the calendar table in there starts with a Min Max. date from the source data.

Is this a technique you would recommend to keep the date table only populated with the date range of the source?   or is there a downside to this?   

 
Posted : 16/12/2018 5:35 am
(@mynda)
Posts: 4762
Member Admin
 

Yes, and variables are covered later in the Power Query course. There is no downside.

 
Posted : 16/12/2018 6:28 am
Share: