Forum Discussion
ibrahimsharaf
10 years agoMicrosoft Employee
Getting all dates between 2 dates
Hello guys, I have 2 columns named, start date and end date, I want to create a column which contains all the dates between the after mentioned dates, for example
Phil_Seamark
9 years agoMicrosoft Employee
Here is a DAX based solution. This is a calculated table and just replace the Table3 with the name of your table.
New Table =
SELECTCOLUMNS(
FILTER(
CROSSJOIN('Table3',CALENDARAUTO()),
'Table3'[EndDate] >= [Date]
&& 'Table3'[StartDate] <= [Date]
),
"Date",[Date])Ashish_Mathur
9 years agoSuper User
Hi Phil,
If i am using the PowerPivot in Excel, where exactly do i have to write this formula. How does one generate a table in the PowerPivot?
- Phil_Seamark9 years agoMicrosoft Employee
Sorry, that code is more for Power BI Desktop or SSAS Tabular where you can create calculated tables in DAX. I recommend you follow ImkeF always excellent suggestions :)
- Ashish_Mathur9 years agoSuper User
Thank you.