I m having data in columns as: –
Process Volume TAT
1 1 Pass
1 2 Fail
2 5 Fail
2 5 Pass
3 1 Pass
4 6 Fail
4 4 Pass
Now grouping by Process, i want the sum of volume (not taking into account whatever TAT), sum of volume where TAT = Pass, sum of Volume where TAT = Fail.
Like this
Process Total Volume Volume(TAT=Pass) Volume(TAT = Fail)
1 3 1 2
2 10 5 5
...
...
For SQL Server, you can use
CASEexpressions to conditionally determine the amount you need to add, thenSUMthem together, like this:For Microsoft Access,
CASEisn’t supported, so you can useSWITCHorIIF, like so: