I've had a go a creating a date column starting 'today' for a given number of days,
and have done so, but I'm not sure if it's the best way essentially
MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
Posts
62,076
Re: Power query Date Column Starting today
Administrative Note:
We would very much like to help you with your query, however you need to include code tags around your code.
Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.
Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
(Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)
Last edited by AliGW; 05-02-2022 at 09:20 AM.
Ali Enthusiastic self-taught user of MS Excel who's always learning! Don't forget to say "thank you" to anyone who has offered you help in your thread. You can reward them by clicking on * Add Reputation below theur user name on the left, if you wish.
Forum Rules (updated September 2018): please read them here.
How to use the Power Query code you've been given: help here. More about the Power suite here.
MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
Posts
62,076
Re: Power query Date Column Starting today
I told you how to do it:
Please take a moment to add the tags. Posting code between [code]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/code] tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.
I've had a look at what you've done,
Not sure how to do that, how do you actually do that 'box ' thing, not trying to be difficult , honest,
I read this second, so sorry about previous reply asking for an example which you've given,
MS 365 Subscription Insider Beta Channel (Windows 11 64-bit)
Posts
62,076
Re: Power query Date Column Starting today
Juat click EDIT to see the post in the edit window and you will then be able to see the [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags I added. That's all you need to do.
Easiest way: select the code and click the # button on the edit toolbar.
Personally, I'd not add the column to the table. But keep it separate and use Index column to relate the two.
But other than that, only recommendation is to use
This isn't critical in most cases, especially when calculation is done once. However, since you are iterating over each row. It is best to use Fixed, so that it does not change value within context of the expression.
Bookmarks