DAX: Get all dates between the Start and End date

Amit Chandak
2 min readAug 18, 2022

--

Power BI- 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

Power BI Data, Between Range

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

--

--

Amit Chandak
Amit Chandak

Written by Amit Chandak

Amit has 20+ years of experience in Business Intelligence, Analytics, Data Science. He is Chief Analytics Officer at Kanerika & Power BI community Super User

No responses yet