Time Intelligence Function - Year to Date Formula for Prior Year Year to Date

scpournara

New Member
Joined
Aug 24, 2014
Messages
40
I am having a very hard time writing a formula for Prior Year, YTD. Everything works correctly by I can not figure this out. For currently year I use the formulae: 2020 YTD:=CALCULATE([TotalSales],DATESYTD('Calendar'[Date])). But for prior year I want to return only the months through June 2020. I can then do my comparisons. Any suggestions?
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Use SUMIFS(sum_range,Criteria_range,Criteria)
=Sumifs( CALCULATE([TotalSales],DATESYTD('Calendar'[Date],"<"&Date(YEAR(TODAY()),6,1))

If you want to encompass a date range, you'll need to add another criteria_range and criteria to include from Last year June 1
 
Upvote 0
Use SUMIFS(sum_range,Criteria_range,Criteria)
=Sumifs( CALCULATE([TotalSales],DATESYTD('Calendar'[Date],"<"&Date(YEAR(TODAY()),6,1))

If you want to encompass a date range, you'll need to add another criteria_range and criteria to include from Last year June 1


Wow, That is AWESOME! I ended up creating a Filter, but that is not sustainable. Love your solution and thanks a lot.
 
Upvote 0

Forum statistics

Threads
1,213,531
Messages
6,114,172
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top