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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Thennarasu_R
Responsive Resident
Responsive Resident

Dax Which is Best one DATESMTD or TOTALMTD

Hi Team !

I need a help from your Side.

We have Two dax function same like DatesMTD and TotalMTD .I'm familiar this two dax functions.But Little confusing in Performance wise. Only one difference from this two .

Compare the both Functions which one is the Better for Performance .


Thanks ,
Thennarasu

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@Thennarasu_R ,

Performance wise there is no huge difference I guess but it is their place of usage makes them different. Please refer the below blogs to get more info in detail.

https://www.pbiusergroup.com/communities/community-home/digestviewer/viewthread?MessageKey=f5161068-... 
https://www.youtube.com/watch?v=BNZSoTYPYQs 
https://community.powerbi.com/t5/Desktop/Which-DAX-function-can-use-in-real-time-projects-TOTALMTD-o... 

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


View solution in original post

4 REPLIES 4
johnt75
Super User
Super User

TOTALMTD is just syntactic sugar for DATESMTD. From https://dax.guide/totalmtd/ 

TOTALMTD (
    <Expression>,
    <Dates>
    [, <Filter>]
)

is the same as

CALCULATE (
    <Expression>,
    DATESMTD ( <Dates> )
    [, <Filter>]
)

Yes @johnt75 

I known the difference both how  working same. difference is Syntax and filter paths only.
Main Difference is 
DatesMTD is a Table Function
TotalMTD is not a Table Function 

my Questions is which one best way to Performance.

Thanks,
Thennarasu

Arul
Super User
Super User

@Thennarasu_R ,

Performance wise there is no huge difference I guess but it is their place of usage makes them different. Please refer the below blogs to get more info in detail.

https://www.pbiusergroup.com/communities/community-home/digestviewer/viewthread?MessageKey=f5161068-... 
https://www.youtube.com/watch?v=BNZSoTYPYQs 
https://community.powerbi.com/t5/Desktop/Which-DAX-function-can-use-in-real-time-projects-TOTALMTD-o... 

Thanks,

Arul





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

Proud to be a Super User!


LinkedIn


Thennarasu_R
Responsive Resident
Responsive Resident

Thanks @Arul 

quickly sharing your feedback,
I will go through above mentioned the link.

Thanks,
Thennarasu

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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