T
themartellekid
I want to calculate totals for Phases from rows that contain multiple Phases.
Table is similar to this:
Fieldshase total_usage
A 10
AC 5
BC 6
C 4
Phase AC = half to A and half to C
My first question is how to approach the problem? I thought of using CASE
as in
select total_usage
case when Phase = "A" then totalA-totalA+total_usage
case when Phase = "AC" then split = total_usae/2, totalA=totalA+split,
totalC=totalC+split
I also considered IIF but that didn't seem right.
Any help will be appreciated. I am a novice.
Table is similar to this:
Fieldshase total_usage
A 10
AC 5
BC 6
C 4
Phase AC = half to A and half to C
My first question is how to approach the problem? I thought of using CASE
as in
select total_usage
case when Phase = "A" then totalA-totalA+total_usage
case when Phase = "AC" then split = total_usae/2, totalA=totalA+split,
totalC=totalC+split
I also considered IIF but that didn't seem right.
Any help will be appreciated. I am a novice.