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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

cumulative calculation DAX

I made a DAX formula for camulative calculations.

See dax formula

Cumulatieve Berekening =
CALCULATE(
    SUM('Grootboekmutaties huidig jaar'[Saldo]),
    FILTER(
        ALLSELECTED('Grootboekmutaties huidig jaar'[Omschrijving]),
        'Grootboekmutaties huidig jaar'[Omschrijving] <= MAX('Grootboekmutaties huidig jaar'[Omschrijving])
    )
)
 

It shows all incoming and outgoing transactions. In the other column the transactions calculates calmulatively due to the DAX formula I made. I made a table with date, incoming and outgoing transactions, transaction_ID and camulative calculation. The problem is when you jump from April 1 to April 2, the camulative calculation starts over again. Does somebody know the solution to this problem?
See example.

DateTransaction_idTransactionsCamulative_calculation 
01-april15050
01-april2-80

-30

01-april3210180
02-april48080
02-april550130

02-april

6100230
1 ACCEPTED SOLUTION

@Anonymous 
Please try

Cumulatieve Berekening =
CALCULATE (
    SUM ( 'Grootboekmutaties huidig jaar'[Saldo] ),
    FILTER (
        ALLSELECTED ( 'Grootboekmutaties huidig jaar'[Omschrijving] ),
        'Grootboekmutaties huidig jaar'[Omschrijving]
            <= MAX ( 'Grootboekmutaties huidig jaar'[Omschrijving] )
    ),
    ALL ( 'Table'[Date] )
)

View solution in original post

4 REPLIES 4
tamerj1
Super User
Super User

Hi @Anonymous 
Date is from which table? What happens if you remove it from the visual?

Anonymous
Not applicable

When i remove the Date column from the visual it works, but i need to include the date column.

@Anonymous 
Please try

Cumulatieve Berekening =
CALCULATE (
    SUM ( 'Grootboekmutaties huidig jaar'[Saldo] ),
    FILTER (
        ALLSELECTED ( 'Grootboekmutaties huidig jaar'[Omschrijving] ),
        'Grootboekmutaties huidig jaar'[Omschrijving]
            <= MAX ( 'Grootboekmutaties huidig jaar'[Omschrijving] )
    ),
    ALL ( 'Table'[Date] )
)
Anonymous
Not applicable

Thank you, this one works

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.