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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Totals - Formula

Status
Not open for further replies.

AndersN

Vendor
Feb 3, 2010
2
NO
Hi,

I am trying to make a profit and loss in Crystal. (Crystal 2008)

At the moment I have made a formula field on account number which groups accounts into 10 different groups. Revenue, Direct cost, Depreciation, Financial income etc…..

Below you can see some of the formula field.

if ({Dim_Account.Accounting identity}) startswith '3' then "01 "+"Revenue"

else if ({Dim_Account.Accounting identity}) in ['408000','409000','410000','416000','417000','419000','644000','644500','648100','651000','662000','700000'] then "02 "+"Materials"

else if ({Dim_Account.Accounting identity}) in ['601000','601500'] then "03 "+"Depreciation"

else ({Dim_Account.Accounting identity})

However I need to make subtotals in the profit and loss based on my formula field for accounts, I have tried to use running totals and the formula field but cant get it to work.

I can’t use on change of field or on change of group as my groupings is in a formula not a Crystal group and it is within a field not change of field. (Accounts)

I would like to make a subtotal for contribution margin. ((1)Revenue –(2)Materials) that will show before (3) depreciation.

Is this possible? Can I re use the formulas I have used to group the accounts to get the running total to evaluate on change of these groups?
Anders
 
If you have a group on your formula in descending order (so Revenue is followed by Materials), then you would just set up a running total that does a sum of {table.amt}, evaluate using a formula:

{@groupformula} = "Revenue" //or "Materials" for the other rt

Reset never. Place these in the group footer and then create a formula:

{#Revenue}-{#Material}

...to be placed also in the group footer--maybe in a _b section. You can conditionally suppress the formula or section using:

{@groupformula} <> "Materials"

-LB
 
I have found another solutions... But it only gets me 60% there....

I have found out that my problem is that I want to use the same information multiple times.

For example by creating another group on top of my previous groupings on Revenue, Depreceiation, Materials etc... I could group make a group called EBIT which combined my first 7 groups to give me a total EBIT. However when I then want to create EBITDA which is EBIT less the depreciation it will not allow me to do this as the data has already been used to create my EBIT total.....

What can I do? (Hope I made myself clear) :)

Anders
 
You can use the same method I outlined in my first suggestion.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top