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!

View solution in original post

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!

View solution in original post

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 446 members 4,681 guests
Please welcome our newest community members: