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
Anonymous
Not applicable

YTD MTD QTD for past database

I have a simple(maybe stupid) question. Smiley Frustrated

 

According to the definition, Year-to-date (YTD) is a period, starting from the beginning of the current year (either the calendar year or fiscal year) and continuing up to the present day.  And, Month-to-date (MTD) is a period starting at the beginning of the current month and ending at the current date.

 

If we have a database which included the data from 01/03/2010 to 31/12/2016, then what YTD or MTD return when we have expressions like:

 

Profit YTD = CALCULATE ( [Total Profit], DATESYTD ( 'Date'[Date] ) )

 

Profit will be calculated on which dates exactly? 

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

@v-yuezhe-msft

So, basically, it takes the last day in current filter context and first of the year of the last day on the current filter context, 

Therefore, if the filter is set on the March 2011, it takes the beginning of 2011 till the end of the current filter which is the March 2011, therefore, it would be "

Jan2011+feb 2011+ Mar2011 

View solution in original post

5 REPLIES 5
v-yuezhe-msft
Employee
Employee

@Anonymous,

Please check the example in the following example to learn more about YTD.
1.PNG

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-yuezhe-msft

Dear Lydia. can you explain more?

@Anonymous,

Take the left image for example, in Feb 2011, the YTD value equals to  "Jan 2011 sales amount value+Feb 2011 sales amount value", in Mar 2011,  the YTD value equals to  "Jan 2011 sales amount value+Feb 2011 sales amount value +Mar 2011 sales amount value".

Regards,
Lydia

Community Support Team _ Lydia Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-yuezhe-msft

So, basically, it takes the last day in current filter context and first of the year of the last day on the current filter context, 

Therefore, if the filter is set on the March 2011, it takes the beginning of 2011 till the end of the current filter which is the March 2011, therefore, it would be "

Jan2011+feb 2011+ Mar2011 

@Anonymous,

Yes. You are right.Smiley Happy

Regards,
Lydia

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

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.