Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

Performance of cummulative measure


I struggle with below measure performance. Could you please help me rewrite it, so it doesnt need that much memory?

Its finishes up with "Couldn't load the data for this visual. There is not enough memory to complete this operation. (...)"

Its working on 4.000.000 rows table 'Sales', pbix is 45mb and PowerBI Desktop is a 64bit version.


Sales_DayCummulative =
var LastSalesTime = CALCULATE( MAX( 'Sales'[Time]); All( 'Sales'))
SELECTEDVALUE( 'Sales'[Time]) > LastSalesTime;
SUM( 'Sales'[Value]);
FILTER( ALLSELECTED( 'Sales'); 'Sales'[Time] <= MAX ( 'Sales'[Time])
Super User IV
Super User IV

Re: Performance of cummulative measure

I wrote a series on performance tuning DAX, see if it helps:


Putting square pegs in round holes since 1972.

I have a NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!

Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Helpful resources

Super Users of the Quarter - Q2 2020

Super Users of the Quarter - Q2 2020

Who are our Super User Superstars? Who made it to the top of the leaderboards? Get the answers!

June 2020 Community Highlights

June 2020 Community Highlights

Featured community members, changes to the Community, and more! Read up on recent Power BI community news.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Power Platform 2020 release wave 2 plan

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors