Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I've gotten solutions within a day - it saved a lot of time and actually got me one ATTABOY from my boss..."

Geography

Where in the world do Tek-Tips members come from?
supportservice (TechnicalUser)
21 May 12 20:08
I'm having a road block on how to go about calculating Net Income and Operating Income with the set of data

CODE

CategoryGroupID CategoryGroupDesc CategoryGroupCode SumOfMTD SumOfLMTD SumOfYTD SumOfLYTD 1 Revenue R $740,079.83 $750,968.68 $2,972,403.40 $3,001,001.56 2 Cost of Sales C ($247,339.60) ($316,744.08) ($1,295,645.13) ($1,313,770.59) 3 Expenses X ($176,723.25) ($236,938.32) ($714,344.81) ($790,067.17) 4 Income and Expenses O ($6,413.14) ($5,168.71) ($1,030.49) ($14,644.61) 5 Income Tax I $0.00 ($1,775.00) ($1,605.22) ($6,348.00) 6 Assets A ($599,271.27) ($85,740.43) ($1,180,680.38) ($128,331.73) 7 Liabilities L $347,723.76 $18,257.63 $654,020.63 ($84,228.43) 8 Equity E $0.00 ($61,428.00) ($81,594.68) ($395,199.39)

To get the Net Income you take the Revenue (R) - (Cost of Sales (C)+Expenses (X)+Income & Expenses (O)+Income Tax (I))

To get the Operating Income you take the Revenue (R) - (Cost of Sales (C)+Expenses (X) )



supportservice (TechnicalUser)
21 May 12 20:21
Was thinking perhaps I need to create sub groups to identify the other two levels?
maxhugen (Programmer)
22 May 12 8:34
I'm thinking that you may need to transform the data. Create a crosstab query, with the CategoryGroupID as the columns. Use a Left Join from your CategoryGroup table, to the data table, to ensure you always get all Categories (even if no data).

Using this query as the base, create a new query, so that in addition to columns 1 to 8, you can add the calculated columns you need.

Max Hugen
Australia

supportservice (TechnicalUser)
22 May 12 12:03
Thanks. I ended up creating another column to identify the sub-group and queried on them.

Appreciate it!

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close