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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
kasiaw29
Resolver II
Resolver II

Rolling Sum between two dates

Hi community,

 

I'm hoping for someone's assistance on a measure I'm trying to create. 

I have a table with orders, their total value and date when it was created and invoiced, see below:

kasiaw29_0-1666773474280.png


Let's use highlighted line as an example
Created 25/05/2021 and invoiced on 08/09/2021 of a value of 7,133.49. I want to create a measure where 7,133.49 shows in May, June, July and droppes of August so it almost rolls into each month from created until it's invoiced. 

 

I tried some measures using DATESBETWEEN or below:

Total Booked Open =
CALCULATE(SUM('Customer Orders'[BOOKED_VALUE]),
FILTER(
    'Calendar',
    'Calendar'[Day] >= MIN('Customer Order Dates'[Date Entered])
        && 'Calendar'[Day] <= MAX('Customer Order Dates'[Invoiced Date])))
 
But it's not working quite as expected. Any advice would be wonderful.
 
Thanks,
Kasia 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@kasiaw29 , please refer if this way can help

 

Measure way
Power BI Dax Measure- Allocate data between Range: https://youtu.be/O653vwLTUzM
https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

new table approch

 

Tables
https://amitchandak.medium.com/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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@kasiaw29 , please refer if this way can help

 

Measure way
Power BI Dax Measure- Allocate data between Range: https://youtu.be/O653vwLTUzM
https://community.powerbi.com/t5/Community-Blog/How-to-divide-distribute-values-between-start-date-o...

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

 

new table approch

 

Tables
https://amitchandak.medium.com/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

Hey @amitchandak 

Had to modify it slightly so that it worked with what I was trying to measure but your article was 100% correct! Thank you! 

 

My measure, in the end, looked like this: 

 

Measure =
CALCULATE(
    SUMX(
        SUMMARIZE(
            FILTER(
                CROSSJOIN('Customer Order Dates','Calendar'),
            'Calendar'[Day] >= 'Customer Order Dates'[Date Entered] && 'Calendar'[Day] <= 'Customer Order Dates'[Invoice Date]),
        'Customer Order Dates'[Date Entered],'Customer Order Dates'[Invoice Date], 'Customer Order Dates'[Booked Value]),
        'Customer Order Dates'[Booked Value]))

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.