Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Totals per Month

Status
Not open for further replies.

codrutza

Technical User
Mar 31, 2002
357
IE
Hi
CR 2013
I’m trying to do some running totals. The report has a group by year and a group by mov. I have to calculate the teus for the mov, I have jobs in detail. Some mov have one job, and some mov have more jobs. So appears like
Mov1 2
Ja 2
Jb 2
Jc 2
Jd 2
Mov2 1
Je 1
Mov3 1
Jf 1
Jg 1
So, I have for the Mov1 2 teus, Mov2 1 teus, Mov3 1 teus ….
I have to calculate the total of teus for each month, each year. I have for each job the rep. date, I take year(repdate), month(repdate) from jobs table.
(I calculate others totals, for example the total of sales, sales are at each job, so I do sum and it’s ok, I don’t have to do running totals..)
I don’t use the insert cross tab , I make formulas and I put them in a manual cross tab.
For Jan if month=1 then @teus, if month=2 then @teus where @teus: if type =20 then 1 else if type=40 then 2; the type is in the mov table.
Then I do the running totals on the J, evaluate for each group mov, reset on each group mov. I tried as well evaluate for each field mov, reset on each group mov.
I made some tests, when I put in the selection formula month(repdate)=jan year((repdate)=2015 the result is correct, when I run the report for all the year, I get the running total with a few teus less for each month.
What do I do wrong?

 
Try putting a Crosstab in the footer of your Year group. Use month as the column and Movie as the row, and do a count of the teus (whatever they are).

You'll need to create two month formulas.
totext({table.date},"MM") is the one you'll use as the column.
totext({table.date},"MMM") is what you want to display as the column header.
 
Thank you for reply, Charliy. I can’t use a cross tab because I need to calculate the margin profit/rev*100 and I need very specific formatting.
Total Jan Feb Mar…..Dec
Sales
Mg%
Teus
ChW


I really need to figure out why my running totals don’t work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top