Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply

Power BI Expanding dates inside of a date range

Hello, I have a dataset that I need to expand date ranges on. The data has campaigns that only run during certain time frames. Also, some of the items are also on the normal daily list and still can be sold outside of the campaign date range. I just want to display, however the dates inside of the campaign and the amount of items sold inside of it. I want a linear date range that will display all dates inside of the date range even if the dates are in the future.

 

BradyLinnebur_0-1693513752762.pngBradyLinnebur_1-1693513794175.png

BradyLinnebur_2-1693513856105.png

Let me know if you need more clarificaiton on anything and I will respond as soon as I can!

Thanks for the help!

 

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

Not sure of what you want.  In the Query Editor, write a custom column formula

={Number.From([Campaign Start Date])..Number.From([Campaign End Date])}

Expand this column.  This will explode your table into one row for each date which falls in the range.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Say the date range is from 8/30/23 - 9/10/23, the dates from 8/30 - 9/6 will be populated since those dates have already happened. I want to also display dates in the future that have not happened yet. I am trying to build a prediction where I can see for an example that 9/8 will sell 2x than 9/3. But I can't quite seem to get dates to populate in the future.

amitchandak
Super User
Super User

@Brady-Linnebur , refer these ways

 

Measure way
Power BI Dax Measure- Allocate data between Range: https://youtu.be/O653vwLTUzM


Tables way
https://amitchandak.mediumcom/dax-get-all-dates-between-the-start-and-end-date-8f3dac4ff90b
https://amitchandak.medium.com/power-query-get-all-dates-between-the-start-and-end-date-9ad6a84cf5f2

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

That is a start so thank you for the info above so far. I also want to have future dates that havent happened yet becuase I want to use predictions for those future dates. Would you mind elaborating on this for this?

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.