Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: SUM/TOTAL of MTD and YTD Post Reply Post New Topic
Author Message
CrystalGirl
Newbie
Newbie


Joined: 22 Feb 2015
Online Status: Offline
Posts: 36
Quote CrystalGirl Replybullet Topic: SUM/TOTAL of MTD and YTD
     Posted: 24 Mar 2015 at 3:47pm
Hi all,

I re-post this because I had the wrong data. So, here is my correct data.

Description     Debit     Credit     Fiscal Period     Fiscal Year     MTD Revenue     YTD
A                    $2,750      $8,550      01               2015           $5,800      $5,800
A                    $1,350      $6,500      02               2015           $5,150      $10,950
A                    $2,250      $4,500      03               2015           $2,250      $13,200
B                    $1,550      $5,500      01               2015           $3,950      $3,950
B                    $1,450      $7,500      02               2015           $6,050      $10,000
B                    $4,500      $5,550      03               2015           $1,050      $11,050
C                    $1,250      $4,600      01               2015           $3,350      $3,350
C                    $1,500      $5,500      02               2015           $4,000      $7,350
C                    $3,250      $6,000      03               2015           $2,750      $10,100

my MTD Revenue formula is:
round({Dataset_.Credit}-{Dataset_.Debit})

and my YTD is from the running total:
Running Total Name: YTD
Summary Field to Summarize: @MTDRevenue
Type of Summary: Sum
Evaluate: For each record
Reset: On Change of Group = Dataset_.Description

What I am trying to achieve is to have the total of MTD and YTD per period. So total of MTD and YTD on January (01), February(02) and March (03)

Anyone can help?


Edited by CrystalGirl - 24 Mar 2015 at 3:50pm
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 25 Mar 2015 at 4:22am
You might need to do this as a sub report.
It all depends on what you want to see as a whole.
Do you need detail rolling data or can you use summarized data like a cross tab?
 
The above alows you to see a 'rolling YTD' per item due to that sorting.
If you want to see a YTD date based on month summarization across all items you could use a sub report and just resort to what you are trying to show.
If you have some freedom in the report design process consider inserting a Cross Tab and testing out different options of grouping and summarizing.
I would first try a row grouped on FP and summarized field of @MTDRevenue set to a SUM
you could then insert a column as description and view that.
These won't show you M to M rolling upward but might still get to the idea you are presenting.
IP IP Logged
CrystalGirl
Newbie
Newbie


Joined: 22 Feb 2015
Online Status: Offline
Posts: 36
Quote CrystalGirl Replybullet Posted: 26 Mar 2015 at 3:16am
Hi DBlank,

Thanks for the responded.

I think that is what I am trying to do. So, how do I do the cross tab that only show the month I want to see? I am doing this report as my sub report because I have to combine different department that run the same report I am posting. So each Department will have to show their MTD and YTD per description.
the main report will link to my sub report on the main parameter of period. So, if each my sub report on each departments can show the MTD and YTD per period I selected, that will be fantastic.

Thank you DBlank
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum