cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
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
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.


I have book! Learn Power BI from Packt


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

Proud to be a Datanaut!

1 REPLY 1
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.


I have book! Learn Power BI from Packt


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

Proud to be a Datanaut!

Helpful resources

Announcements
Community Highlights

Community Highlights

Find out what's new in the Power BI Community!

Summit North America

Power Platform Summit North America

Register by September 5 to save $200

Virtual Launch Event

Microsoft Business Applications Virtual Launch Event

Watch the event on demand for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Users Online
Currently online: 113 members 1,848 guests
Please welcome our newest community members: