DAX: Get all dates between the Start and End date
Problem Statement: Data has been provided with the date range in each row. Data need to be distributed or expanded for all the dates in the range.
A new solution is needed using the DAX.
The old DAX solution is here. The old Power Query solution is here
In DAX, we can use Generate along with Calendar to solve this. Calendar can create a table of the dates between two dates, but Generate is needed, for each row table to expand into multiple rows.
The Initial Data
Create a new table using generate and calendar DAX functions
Expanded = GENERATE(Data,CALENDAR(Data[Start date],Data[End date]))
The new table
You can video on the same topic, on my YouTube Channel.
You can find the file here
Click Here to access all my blogs and videos in a jiffy via an exclusive visual glossary using Power BI.
Please like, share, and comment on these. Your suggestions on improvement, challenges, and new topics will help me explore more.
You Can watch my Power BI Tutorial Series on My Channel, Subscribe, Like, and share