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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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