harus diubah dalam bentuk atomic:
periode | total wo | total cost | head count |
jan 2011 | 1.283 | 241.185 | 159 |
feb 2011 | 1.673 | 370.64 | 159 |
total | 2.956 | 611.825 | 318 |
dari tabel di atas bisa dibentuk tabel access: tbl_data (periode, total_wo, head_count, total_cost)
isi tabel adalah:
ID | periode | total_wo | total_hcount | total_cost |
---|---|---|---|---|
5 | jan 2011 | 1.283 | 159 | 241.185 |
7 | feb 2011 | 1.673 | 159 | 370.64 |
dari table ini bisa diturunkan query summary:
SELECT Sum(tbl_data.total_wo) AS tot_wo, Sum(tbl_data.total_hcount) AS tot_hcount, Sum(tbl_data.total_cost) AS tot_cost, [tot_cost]/[tot_wo] AS cost_wo, [tot_cost]/[tot_hcount] AS cost_hcount
FROM tbl_data;
maka akan di peroleh hasil query:
tot_wo | tot_hcount | tot_cost | cost_wo | cost_hcount |
---|---|---|---|---|
2.956 | 318 | 611.825 | 206.977334235453 | 1.92397798742138 |
aksan kurdin
On 7/16/2013 11:25 AM, Bule wrote:
Dear mastah dan rekan2 mohon bantuuannya,
Saya ada kendala didalam penjumlahan nilai yg ada pada satu field.
contoh table :
saya punya satu table namanya DATA
isinya :
Label | jan 2011 | feb 2011 |
---------------------------------------
total wo | 1.283 | 1.673 |
total cost | 241.185 | 370.640 |
head count | 159 | 159 |
cost/wo | | |
cost/headcount| | |
---------------------------------------
saya ingin menanyakan bagaimana cara mencari hasil :
Cost/wo :
cost/headcount :
RUMUS cost/wo = ( total cost / total wo )
RUMUS cost/headcount = ( total cost / head count)
Mohon sangat bantuannya,
Terima kasih
Reply via web post | Reply to sender | Reply to group | Start a New Topic | Messages in this topic (4) |
Tidak ada komentar:
Posting Komentar