cancel
Showing results for
Search instead for
Did you mean:
phamtrinh96 Regular Visitor

## [ With TOTALMTD in DAX ]

I have 2 column , There are time and Amount_Day.  and I want to caculated Amount_Month , Amount_Month same MTD. but I caculated Amount_Month = TOTALMTD(sum(Amount_Day),time) then the result same Amount_Day. I want to know the making. Column Amount_Month is the result I want. I have a figure example. Thanks you for your help

 Time Amount_Day Amount_Month Amont_Month_Desire 01.12.2018 23000 23000 23000 02.12.2018 50000 50000 73000 05.12.2018 40000 40000 113000 06.12.2018 27000 27000 140000
1 ACCEPTED SOLUTION

Accepted Solutions Super User

## Re: [ With TOTALMTD in DAX ]

If you want that as a column, you will need to do something like this:

```Column =
VAR __table = FILTER(ALL('Table13'),[Time] <= EARLIER('Table13'[Time]))
RETURN TOTALMTD(SUMX(__table,[Amount_Day]),'Table13'[Time])```

As a measure, your formula works fine. See Page 7 and Table13 of attached.

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

1 REPLY 1 Super User

## Re: [ With TOTALMTD in DAX ]

If you want that as a column, you will need to do something like this:

```Column =
VAR __table = FILTER(ALL('Table13'),[Time] <= EARLIER('Table13'[Time]))
RETURN TOTALMTD(SUMX(__table,[Amount_Day]),'Table13'[Time])```

As a measure, your formula works fine. See Page 7 and Table13 of attached.

Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!