Forum Discussion
Generate date column using generate series
- 7 years ago
Hi duggy,
Based on my test, you could refer to below steps:
Create a calender table:
Date Table = CALENDAR(MAX('Table2'[startspecialdaydate]),MAX('Table2'[Endspecialdaydate]))Create a new table:
Result Table = SUMMARIZECOLUMNS('Table1'[StoreId],'Table1'[specialdayname],'Date Table'[Date])Result:
You could also download the pbix file to have a view.
Regards,
Daniel He
Hi,
As long as data in the 3rd and 4th columns are actual dates, you should be able to get your desired result by using the following M code
={Number.From([startspecialdaydate[)..Number.From([Endspecialdaydate])}
Hi,
Sorry, not following. Are you saying to create a new column in the specialdays table and use the code:
theeventdates = {Number.From([startspecialdaydate])..Number.From([Endspecialdaydate])}
I get the syntax for 'From' is incorrect when I try this.
- Ashish_Mathur7 years agoSuper User
Hi,
That M code has to be written int he Query Editor. In the Query Editor, go to Add Column > Custom column