cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
phamtrinh96 Regular Visitor
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

TimeAmount_DayAmount_MonthAmont_Month_Desire
01.12.2018230002300023000
02.12.2018500005000073000
05.12.20184000040000113000
06.12.20182700027000140000
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
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
Highlighted
Super User
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!