I have a access database with jan - dec headings with peoples pay for those months in it.
eg.
jan | feb | mar | apr | may | june |
-----------------------------------------------------
100 | 20 | 3 | 4 | 0 | 3 |
and what i want to do is get the Estimated average for jan-dec wage. so
if the above was in calculation format -
100+20+3+4+0+3+..... * 12 = Actual total
But I need the estimated total. So basically, I want it to only devide by the number of fields with values in them.
So, say it was only till June...
jan | feb | mar | apr | may | june |
-----------------------------------------------------
100 | 20 | 3 | 4 | 0 | 3 |
This would be
100+2+3+4+3 /5 *6 = estimated average
I know that SQL doesnt act as a programming language but i was wondering if there was a way to count the fields that dont have 0 in them and then use the count as the devider?
Anyone any ideas?
eg.
jan | feb | mar | apr | may | june |
-----------------------------------------------------
100 | 20 | 3 | 4 | 0 | 3 |
and what i want to do is get the Estimated average for jan-dec wage. so
if the above was in calculation format -
100+20+3+4+0+3+..... * 12 = Actual total
But I need the estimated total. So basically, I want it to only devide by the number of fields with values in them.
So, say it was only till June...
jan | feb | mar | apr | may | june |
-----------------------------------------------------
100 | 20 | 3 | 4 | 0 | 3 |
This would be
100+2+3+4+3 /5 *6 = estimated average
I know that SQL doesnt act as a programming language but i was wondering if there was a way to count the fields that dont have 0 in them and then use the count as the devider?
Anyone any ideas?