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

scpournara

New Member
Joined
Aug 24, 2014
Messages
41
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

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
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,214,982
Messages
6,122,581
Members
449,089
Latest member
Motoracer88

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