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
sephirot2000
Frequent Visitor

Acumulative totals in matrix cels

Hi everyone.

I ´m trying to set a Matrix visual to show teh acumulative values of the warehouses per month.
But all I have is the sum of the movements of the current monyh. Tried ChatGPT to solve the measure but still not works as spected:

sephirot2000_1-1702984874522.png

 

In the image you can see the sum of the movements of each month, but I spected to see in may for example, total of April + Total of May. This is my DAX formula:

suma acumulada cost amount actual =
CALCULATE(
    SUM(valueEntries[costAmountActual]),
    FILTER(
        ALL(valueEntries[postingDate]),
        valueEntries[postingDate] <= MAX(valueEntries[postingDate])
    ))
Any help please?
Thanks in advance.
1 ACCEPTED SOLUTION
Fowmy
Super User
Super User

@sephirot2000 

Try his measure:

suma acumulada cost amount actual =
CALCULATE (
    SUM ( valueEntries[costAmountActual] ),
    FILTER (
        ALL ( valueEntries ),
        valueEntries[postingDate] <= MAX ( valueEntries[postingDate] )
    )
)

The months in the columns, are they coming from the same table as other fields or do you have a seperate date table.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

View solution in original post

6 REPLIES 6
Fowmy
Super User
Super User

@sephirot2000 

Try his measure:

suma acumulada cost amount actual =
CALCULATE (
    SUM ( valueEntries[costAmountActual] ),
    FILTER (
        ALL ( valueEntries ),
        valueEntries[postingDate] <= MAX ( valueEntries[postingDate] )
    )
)

The months in the columns, are they coming from the same table as other fields or do you have a seperate date table.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Thanks a lot, your answer put me in the righ way.

I comnplete the formula with my own filters and worked very well.

TOTALES CALCULADOS FILTRADOS 2 =
VAR TOTAL_HASTA_FIN_DE_MES =
CALCULATE(
    SUM(valueEntries[costAmountActual]),
    FILTER(
        ALLEXCEPT(valueEntries, valueEntries[gblDim1Code]),
        //ALLSELECTED(valueEntries[postingDate]),
        YEAR(valueEntries[postingDate]) = YEAR(MAX(valueEntries[postingDate])) &&
        MONTH(valueEntries[postingDate]) <= MONTH(MAX(valueEntries[postingDate])) &&
        NOT ISBLANK(valueEntries[itemNo])
    )              
)
 RETURN
 TOTAL_HASTA_FIN_DE_MES

Hi and thanks for the answer.
the dates came from a separate table to filter but I can set in the same table.

@sephirot2000 
Please try

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Not worked as spected:

sephirot2000_0-1702990693815.png

 

Ok my fault, I had a filter in the visual object.
The sum in now correct for the total, now I have to configure the Totals for the cells in the righ way. Thanks 

sephirot2000_0-1702996421946.png

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

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.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.