Forum Discussion
How do i create a date table ?
Hi GilesWalker, Thanks for all the Dax formulas.
I have created Datekey table and all the other coloums, and created relationship with my flattable in powr bi desktop. But, when I am am trying to show data week wise, using week coloumn it is showing blank in X-axis.
My report requirment to show last four week of sales using storewise and category wise.
Please advice me for better logic
This is a little out of scope here, but is there a way to create this table to dynamically update and add a new day? For example, if I use the caledar(date(),date()) I'm obviously closing it with a specific date. Any way to make it where it continues and does not have to be updated manually in the future?
- wwhittenton8 years agoHelper II
mpm000 Assuming you haven't already figured this out or found the answer in another thread, the following formula should auto-update based on the current date. (Note my time table starts Jan 2000.)
DateKey = CALENDAR( DATE(2000,01,01) , DATE(YEAR(NOW()) , MONTH(NOW()) , DAY(NOW()) ))