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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
vinnyrigoni
New Member

Sales Pace

Hello, I would like to create a sales rhythm in which I have the YEAR-MONTH values ​​in column 3, while in column 4 I have the accumulated. I would like to replace the values ​​equal to zero in column 3 with the sum of the last accumulated, and thus be able to make column 4 accumulate larger values ​​even if there is still 0 in column 3. Remembering that every month the value will be updated at the end of the month, so it can no longer be the accumulated one, but rather the current closed accumulated one. Could anyone help?print.png

 

accumulated formula:

 

 

 

Accumulated = 
CALCULATE(
    SUM(Table[column2]),
    FILTER(
        ALL(Table),
        Table[Date] <= MAX(Table[Date])
    )
)

 

 

 

Exemplo:

- in line setembro , column 3, the value will be 5.775.824,00. 

- in line outubro, collumn 3, the value will be 5.775.824,00 + 5.775.824,00  = 11.551648

- in line novembro, collumn 3, the value will be 11.551648 + 11.551648 = 23.103.296

.....

..

.

.

.

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @vinnyrigoni 

You can refer to the pbix file attacted in the end.

First create an index column in power query.

vjialongymsft_0-1724893337402.png

Then using the following dax:

Ending Balance2 = 
VAR _index = SELECTEDVALUE(Movements[Index])
VAR total= CALCULATE(SUM(Movements[Mov Existence]),FILTER(ALL(Movements),'Movements'[Index] <= _index))

RETURN total

 

 

Result:

vjialongymsft_1-1724893509151.png

 

 

 

 

 

Best Regards,

Jayleny

 

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

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @vinnyrigoni 

You can refer to the pbix file attacted in the end.

First create an index column in power query.

vjialongymsft_0-1724893337402.png

Then using the following dax:

Ending Balance2 = 
VAR _index = SELECTEDVALUE(Movements[Index])
VAR total= CALCULATE(SUM(Movements[Mov Existence]),FILTER(ALL(Movements),'Movements'[Index] <= _index))

RETURN total

 

 

Result:

vjialongymsft_1-1724893509151.png

 

 

 

 

 

Best Regards,

Jayleny

 

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

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.