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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
HuubKW
Regular Visitor

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

@HuubKW 
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 @HuubKW 
Date is from which table? What happens if you remove it from the visual?

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

@HuubKW 
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] )
)

Thank you, this one works

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors