infinitizon
MIS
Hi guys,
I'm at a fix currently,
I have a database that looks like this
I want the report to be grouped by No_ and then by Job Category while picking only the distinct COGS.
To achieve this, I grouped first by No_, then by Job Category. I now did an average for COGS. So that at the group by No_. I now have something like this
Note: GP = Amount - COGS
COGS is the distinct value(I used average to get that)
The challenge is when I want to get the sum at the Job Category level so that I have some thing like this
Any ideas?
Thanks in advance...
____________________
Men put up a strong face just to cover their weaknesses...good!
But a smile makes them live longer....
Which would you choose?
Think about it.
I'm at a fix currently,
I have a database that looks like this
Code:
No_ Document No_ Job desc Job Category COGS Amount GP
JCE26506 PSIV39095 MATERIALS USED Field Service 741360.66 448354.46 706993.80
JCE26506 PSIV39095 LABOUR Field Service 741360.66 51875.29 -689485.37
JCE26506 PSIV39095 TRANSPORTATION Field Service 741360.66 5000.00 -736360.66
JCE26359 PSIV39000 MATERIALS USED Contract 35741.21 360284.00 324542.79
JCE26359 PSIV39000 LABOUR Contract 35741.21 26000.00 -9741.21
JCE26359 PSIV39000 TRANSPORTATION Contract 35741.21 5500.00 -30241.21
I want the report to be grouped by No_ and then by Job Category while picking only the distinct COGS.
To achieve this, I grouped first by No_, then by Job Category. I now did an average for COGS. So that at the group by No_. I now have something like this
Code:
No_ Document No_ COGS Amount GP
[b]Field Service[/b]
JCE26506 PSIV39095 741360.66 505229.75 -236130.91
JCE26507 PSIV39097 64136.66 201229.75 137093.09
[b]Contract[/b]
JCE26359 PSIV39000 35741.21 391784.00 356042.79
JCE26360 PSIV39003 34551.21 401784.00 367232.79
Note: GP = Amount - COGS
COGS is the distinct value(I used average to get that)
The challenge is when I want to get the sum at the Job Category level so that I have some thing like this
Code:
No_ Document No_ COGS Amount GP
[b]Field Service 805497.32 706459.5 -99037.82[/b]
JCE26506 PSIV39095 741360.66 505229.75 -236130.91
JCE26507 PSIV39097 64136.66 201229.75 137093.09
[b]Contract 70292.42 793568.00 723275.58[/b]
JCE26359 PSIV39000 35741.21 391784.00 356042.79
JCE26360 PSIV39003 34551.21 401784.00 367232.79
Any ideas?
Thanks in advance...
____________________
Men put up a strong face just to cover their weaknesses...good!
But a smile makes them live longer....
Which would you choose?
Think about it.