Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
bjones
New Member

TOTALMTD not returning a value

Hi All,

 

I am new to PowerBI and cannot seem to get the TotalMTD formula to work in a new Measure.  I read the other posts but no matter what I do the formula does do as intended.  I have used dates within the existing report as well as using a linked date report.  Is there a certain date format that I should be following?

 

MTD Collections = TOTALMTD(SUM(Reciepts[Amount Received]),Reciepts[Date]); and

MTD Collections = TOTALMTD(SUM(Reciepts[Amount Received]),'Datekey'[Date]).

 

Both sets of dates are formatted as (yyyy/MM/dd)

 

 Thanks in advance for your assistance.

 

Regards,

Bruce

1 ACCEPTED SOLUTION

Hi @bjones,

 

As you mentioned in original post, the date is 'yyyy/MM/dd' format. But from the screenshots, it seems that you display date hierarchy instead of date value so the TOTALMDT is not working. In your scenario, you need to display date value in the table, then change aggregate function for the [Matter no count] as SUM, then create the measure like below:

 

MTD_Arrangements=TOTALMTD(SUM('Fixed arrangement'[Matter no count]),'Datekey'[Date])

 

 

q2.PNG

 q1.PNG

 

 

If you have any question, please feel free to ask.

 

Best Regards,
Qiuyun Yu

 

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

View solution in original post

4 REPLIES 4
Greg_Deckler
Super User
Super User

Any chance you can post some sample data, your result and the expected result?

 

I'll have to try it with yyyy/MM/dd but generally I have my dates in dd/MM/yyyy.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Totalmtd all selected.pngTotalmtd.png

 

Hi Smoupre,

 

I have moved on to a new data set but the formulas remain the same in principle. ONe fgives me the sum per day and the other returns the mtd total in each day as opposed to the cumulative total in each day. I need it to return the below data set.

 

TotalMTD goal.png

 

I hope that this is clear.

 

Cheers,,

 

Bruce

 

Hi @bjones,

 

As you mentioned in original post, the date is 'yyyy/MM/dd' format. But from the screenshots, it seems that you display date hierarchy instead of date value so the TOTALMDT is not working. In your scenario, you need to display date value in the table, then change aggregate function for the [Matter no count] as SUM, then create the measure like below:

 

MTD_Arrangements=TOTALMTD(SUM('Fixed arrangement'[Matter no count]),'Datekey'[Date])

 

 

q2.PNG

 q1.PNG

 

 

If you have any question, please feel free to ask.

 

Best Regards,
Qiuyun Yu

 

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

looking at your last table; it does not actually seem like a MTD because those are not dates but rather a cumulative running total:

 

Running = SUMX(
                             FILTER('Fixed Arrangement',
                                             'Fixed Arrangement'[Column1]<=EARLIER('Fixed Arrangement'[Column1])
                                        ),
                             'Fixed Arrangement'[Column2])

 

.... assuming that 'Fixed Arrangement' is the table name; then I used 'column1' and 'column2' rather than what I see as your actual column names since they seem to change by table ....so you can use whichever is right for you.....

www.CahabaData.com

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.