• found an explanation for any other intrepid folks that might be trying to create a calendar using PowerQuery... (not sure why one would want to do that, since it's so easy to use a script here... but anyway. Maybe because you don't have access to one?)

    There's an explanation in PowerPivot Alchemy on page 197 that is missing from Rob Collie and Avichal Singh's book. Collie's book has some code, but the really confusing thing is that he uses Date as a variable name and as a datatype. If you read the explanation in Power Pivot Alchemy, they put some of the script in italics so that you can see what values to change. (he admits to being something of an M script kiddie, which is okay... a little bit of explanation of what's going on would have been a lot more helpful... otherwise, really good book!)

    Hope this helps someone else... just a really confusing chunk of code for me.