Calculate YTD and QTD

Pearl_022

New Member
Joined
Jan 21, 2021
Messages
22
Office Version
  1. 365
  2. 2016
  3. 2013
  4. 2010
Platform
  1. Windows
  2. MacOS
HI All,
Need help in creating formulas for QTD & YTD based on a criteria.


Need a formula for calculating QTD & YTD in below output table based on data table for both TotalBatches and TotalRejection.

Please help me creating calculation.

Data Table
(In my data table I have 12 months of data with multiple same dates)

SiteDateMonthYearTotalbatchesTotalRejection
Texas1/1/20191201940
Boston1/1/2019120191984
Chicago2/1/201922019907
New Jersey2/1/2019220192545
New York3/1/2019320195673
Philadelphia3/1/201932019870
Maryland4/1/201942019792
Delawar4/2/201942019900
Texas1/1/20201202040
Boston1/1/20201202030
Chicago2/1/20202202072
New Jersey2/1/20202202083
New York3/1/202032020541
Philadelphia3/1/202032020605

Thanks in advance.
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Do you need the QTD Total by Year? or it does not matter? Same for YTD.

Also, do you need the sum for QTD in one cell? or is it a running sum after each transaction in the data?
 
Upvote 0
Do you need the QTD Total by Year? or it does not matter? Same for YTD.

Also, do you need the sum for QTD in one cell? or is it a running sum after each transaction in the data?
I want to calculate QTD by year and same for YTD. I have updated data where I have only dec 2019 data and whole year data for 2020.

I want sum for QTD
 
Upvote 0
try this

Book1
ABCDEFGHIJK
1SiteDateMonthYearTotalbatchesTotalRejectionYearQTDTotalbatchesTotalRejection
2Texas01/01/2019120194020191120019
3Boston01/01/2019120191984246113
4Chicago02/01/20192201990739088
5New Jersey02/01/201922019254541692
6New York03/01/2019320195673YTD273842
7Philadelphia03/01/201932019870
8Maryland04/01/201942019792
9Delawar04/02/201942019900
10Texas01/01/20201202040
11Boston01/01/20201202030
12Chicago02/01/20202202072
13New Jersey02/01/20202202083
14New York03/01/202032020541
15Philadelphia03/01/202082020605
16Texas01/01/20195201940
17Boston01/01/2019520191984
18Chicago02/01/201962019907
19New Jersey02/01/2019820192545
20New York03/01/2019920195673
21Philadelphia03/01/201992019870
22Maryland04/01/2019112019792
23Delawar04/02/2019122019900
Sheet1
Cell Formulas
RangeFormula
J2:K5J2=SUMPRODUCT(($D$2:$D$23=$H$2)*(ROUNDUP($C$2:$C$23/3,0)=$I2)*(E$2:E$23))
J6:K6J6=SUMIF($D$2:$D$23,$H$2,E2:E23)
 
Upvote 0

Thanks for your response. I am trying but not sure its not working it seems. Lets say I am creating report for only 2020 data, where I need to make my YTD work with site filter in dashboard I created with graphs. How can I achieve that ?


For Example,

MTDYTDQTD2019 YTD
Total Baches

Thanks,
Pearl
 
Upvote 0
Thanks for your response. I am trying but not sure its not working it seems. Lets say I am creating report for only 2020 data, where I need to make my YTD work with site filter in dashboard I created with graphs. How can I achieve that ?


For Example,

MTDYTDQTD2019 YTD
Total Baches

Thanks,
Pearl

I might misunderstood your requirements.
based on the data in your first post could you fill in the results expected for post #5 so that we know the expected results.
 
Upvote 0
Hi Alan,

I created one dashboard view where I need to calculate MTD, YTD and QTD. I need MTD, YTD and QTD should work with site filter in dashboard. Attached screenshot might give you better understanding. Please let me know if you are still not clear. I need to deliver this dashboard next week.

Another issue is when I calculated YTD and it is giving me result for all sites in dashboard and I am unable to connect slicer/filter for that.

SiteDateMonthYearTotalbatchesTotalRejection
Texas
12/1/19​
12​
2019​
4​
0​
Boston
12/1/19​
12​
2019​
5​
4​
Chicago
12/1/19​
12​
2019​
6​
0​
New Jersey
12/1/19​
12​
2019​
1​
4​
Chicago
1/1/20​
1​
2020​
90​
7​
New Jersey
1/1/20​
1​
2020​
6​
5​
New York
1/1/20​
1​
2020​
0​
3​
Philadelphia
2/1/20​
2​
2020​
10​
0​
Maryland
2/1/20​
2​
2020​
15​
2​
Delawar
3/1/20​
3​
2020​
30​
0​
Texas
3/1/20​
3​
2020​
4​
0​
Boston
4/1/20​
4​
2020​
3​
0​
Chicago
4/1/20​
4​
2020​
7​
2​
New Jersey
5/1/20​
5​
2020​
8​
3​
New York
5/1/20​
5​
2020​
30​
1​
Philadelphia
6/1/20​
6​
2020​
15​
5​
Ohio
6/1/20​
6​
2020​
2​
0​
Maryland
6/1/20​
6​
2020​
7​
2​
Delawar
7/1/20​
7​
2020​
5​
0​
Texas
7/1/20​
7​
2020​
4​
0​
Boston
8/1/20​
8​
2020​
3​
0​
Chicago
8/1/20​
8​
2020​
7​
2​
New Jersey
9/1/20​
9​
2020​
8​
3​
New York
9/1/20​
9​
2020​
2​
1​
Philadelphia
9/1/20​
9​
2020​
5​
5​
Ohio
10/1/20​
10​
2020​
10​
0​
Maryland
10/1/20​
10​
2020​
15​
2​
Delawar
11/1/20​
11​
2020​
5​
0​
Texas
11/1/20​
11​
2020​
4​
0​
Boston
12/1/20​
12​
2020​
3​
0​
Chicago
12/1/20​
12​
2020​
7​
2​
New Jersey
12/1/20​
12​
2020​
8​
3​
New York
12/1/20​
12​
2020​
3​
1​
Philadelphia
12/1/20​
12​
2020​
1​
5​
 

Attachments

  • Screen Shot 2021-02-05 at 7.48.58 AM.png
    Screen Shot 2021-02-05 at 7.48.58 AM.png
    227 KB · Views: 19
Upvote 0

Forum statistics

Threads
1,214,892
Messages
6,122,112
Members
449,066
Latest member
Andyg666

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