cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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:

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])
))
1 ACCEPTED SOLUTION
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
6 REPLIES 6
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
Frequent Visitor

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

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

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

Super User

@sephirot2000

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

Not worked as spected:

Frequent Visitor

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

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

#### Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

#### Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

#### Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors