Power BI: cumulative total values with empty cells
In a table with blank cells, there are different ways to show a cumulative result:
- Cumulate values without taking care about those empty cells (for instance, column and column 2)
- Cumulate values by restarting it from 0 after empty cells (for instance, column 4 and column 5)
Let’s me explain the different columns. For “column”, I will use the formula on this article Power BI: cumulative total values, but the result is not very clean.
For “column 2”, I am using the formula of “column” but the result is cleaner because I added this:
IF(NOT(ISBLANK('table'[argument1])),formula of column)
NOTE: replace table and argument1 by yours
For “column 4”, to reset the cumulative after each empty cells, I will need first to create the “column 3” to give an ID for each “result” group with this formula:
var gresult=IF(NOT(ISBLANK('table'[argument1])),CALCULATE(COUNTBLANK('table'[argument1]),FILTER('table',
'table'[argument2]<=EARLIER('table'[argument2]))))
return
IF(ISBLANK(gresult),IF(NOT(ISBLANK('table'[argument1])),0),gresult)
Once done, the formula of “column 4”:
IF(NOT(ISBLANK('table'[argument3])),CALCULATE(SUM('table'[argument1]),FILTER(ALL('table'),'table'[argument2]
<=EARLIER('table'[argument2]) && 'table'[argument3]=EARLIER('table'[argument3]))))
Now if I want to add a condition, for instance, to reset it for each “support” group, I will add:
&& 'table'[argument4]=EARLIER('table'[argument4])
This is what I did for “column 5”:

Interesting Topics
-
Be successfully certified ITIL 4 Managing Professional
Study, study and study, I couldn’t be successfully certified without studying it, if you are interested...
-
Be successfully certified ITIL 4 Strategic Leader
With my ITIL 4 Managing Professional certification (ITIL MP) in the pocket, it was time to go for the...
-
Hide visual and change background color based on selection
Some small tricks to customize the background colour of a text box...
-
Stacked and clustered column chart or double stacked column chart
In excel, I use a lot the combination of clustered and stacked chart...
-
Refresh Power BI
From the Power BI Service, I can set refresh but, for instance, there is no option to do it monthly or each time a change is made...
-
Power BI alerts to be sent by email from an excel file based on condition
I will explain how to send a list of emails from an excel file after creating alerts...






