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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
egabriel
New Member

Cumulative value between dates of each row

Hi there, need some assistance with calculating cumulative values.
I have a table with the billings of a certain period and I need to add the values ​​that are between the dates of each row.

egabriel_0-1662380505355.png

According to the excel model, I use the two dates of each line as a calculation condition.

I found a solution, but when I use a larger database, BI crashes

Memory error: Memory Allocation failure . Try simplifying or reducing the number of queries.

 

Calculation

Accumulation =
    VAR Due date = Invoicing[Due date]
    VAR Issue = Invoicing[Issue]
    VAR Result =  
CALCULATE([SumValues],
ALL(Invoicing),
Invoicing[Issue]<=Due date,
Invoicing[Due date] >=Issue
)
Return Result
 

Can you offer any advice to fix this please?

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure whether I understood your question correctly, but please try the below whether it suits your requirement. It is for creating a calcualted column.

 

Accumulation CC =
SUMX (
    FILTER (
        Invoicing,
        Invoicing[Due date] >= EARLIER ( Invoicing[Issue] )
            && Invoicing[Issue] <= EARLIER ( Invoicing[Due date] )
    ),
    Invoicing[Value]
)

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I am not sure whether I understood your question correctly, but please try the below whether it suits your requirement. It is for creating a calcualted column.

 

Accumulation CC =
SUMX (
    FILTER (
        Invoicing,
        Invoicing[Due date] >= EARLIER ( Invoicing[Issue] )
            && Invoicing[Issue] <= EARLIER ( Invoicing[Due date] )
    ),
    Invoicing[Value]
)

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Hello, your calculation is correct, but when I added 2 more conditions and went to update through onedrive, it presented the memory error.
Even though it's a small base of 24mb.

 

egabriel_0-1662400599171.png

 

Hi @egabriel ,

 

Refresh is a background operation that can occur when two conditions are met:

  • There is sufficient memory
  • The number of supported concurrent refreshes for the Premium capacity is not exceeded

When the conditions are not met, the refresh is queued until the conditions are favorable.

 

For a full refresh, recall that at least double the current dataset memory size is required. If sufficient memory is not available, then the refresh cannot commence until model eviction frees up memory - this means delays until one or more datasets becomes inactive and can be evicted.

 

For more information, please refer to: Optimize Microsoft Power BI Premium capacities - Power BI | Microsoft Docs

 

Please check if there is any remaining memory in the workspaces.

vyadongfmsft_0-1662452925282.png

 

Best regards,

Yadong Fang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.