cancel
Showing results for
Did you mean:
Frequent Visitor

## DAX Cumulative Totals not equal zero for associated fields

Help please ,Im using this formula :

Cumulative Acutal =
CALCULATE (
SUM ( 'Cashflow'[Actual(AED)] ),
ALL ( 'Cashflow'),
'Cashflow'[Date] <= EARLIER ( 'Cashflow'[Date] ))

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team

## Re: DAX Cumulative Totals not equal zero for associated fields

Hi @abusen,

```Column =
VAR temp =
CALCULATE (
SUM ( Table1[Sales] ),
FILTER ( ALL ( Table1 ), 'Table1'[Date] <= EARLIER ( Table1[Date] ) )
)
RETURN
IF ( ISBLANK ( 'Table1'[Sales] ), 0, temp )
```

Here is the output.

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
3 REPLIES 3
Member

## Re: DAX Cumulative Totals not equal zero for associated fields

Hi, I don't have the same names as you but if I have:

`TOTALYTD(SUM(Resultattransaktioner[Belopp justerat]);Datumkoppling[Datum])`

I get all months.

But if I add a filter with DATESBETWEEN as in:

`CALCULATE(TOTALYTD(SUM(Resultattransaktioner[Belopp justerat]);Datumkoppling[Datum]);DATESBETWEEN(Datumkoppling[Datum];MIN(Resultattransaktioner[Bokf datum]);MAX(Resultattransaktioner[Bokf datum])))`

then I show only the months where Actual(AED) has value, the rest are zero. I have though a separate date table.

Frequent Visitor

## Re: DAX Cumulative Totals not equal zero for associated fields

Highlighted
Community Support Team

## Re: DAX Cumulative Totals not equal zero for associated fields

Hi @abusen,

```Column =
VAR temp =
CALCULATE (
SUM ( Table1[Sales] ),
FILTER ( ALL ( Table1 ), 'Table1'[Date] <= EARLIER ( Table1[Date] ) )
)
RETURN
IF ( ISBLANK ( 'Table1'[Sales] ), 0, temp )
```

Here is the output.

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.