Adding up 3 columns

I will try the expression now and see if it works.

Thank you very much.:)
 
Personally I would use a custom function to make the query tidier. Otherwise the entire expression must be repeated.

Code:
Total_Throughput:Iif(Nz([Oil_Throughput_Capacity_(bpd)],0)+Nz([Gas_Throughput_Capacity_(MMcfd)],0)+Nz([LNG_Throughput_Capacity_(Tonnes_per_Annum)],0), Null,  Nz([Oil_Throughput_Capacity_(bpd)],0)+Nz([Gas_Throughput_Capacity_(MMcfd)],0)+Nz([LNG_Throughput_Capacity_(Tonnes_per_Annum)],0))


I have just tried it, this expresion replaces the empty rows with 0 and the rows that should have a value with Null,so it does not work,unfortunately.
 
Sorry, left our an important bit. The "= 0"

Code:
Total_Throughput:Iif(Nz([Oil_Throughput_Capacity_(bpd)],0)+Nz([Gas_Throughput_Capacity_(MMcfd)],0)+Nz([LNG_Throughput_Capacity_(Tonnes_per_Annum)],0) = 0, Null,  Nz([Oil_Throughput_Capacity_(bpd)],0)+Nz([Gas_Throughput_Capacity_(MMcfd)],0)+Nz([LNG_Throughput_Capacity_(Tonnes_per_Annum)],0))
 
Sorry, left our an important bit. The "= 0"

Code:
Total_Throughput:Iif(Nz([Oil_Throughput_Capacity_(bpd)],0)+Nz([Gas_Throughput_Capacity_(MMcfd)],0)+Nz([LNG_Throughput_Capacity_(Tonnes_per_Annum)],0) = 0, Null,  Nz([Oil_Throughput_Capacity_(bpd)],0)+Nz([Gas_Throughput_Capacity_(MMcfd)],0)+Nz([LNG_Throughput_Capacity_(Tonnes_per_Annum)],0))


It worked!

Thank you so much for all your help.I will try to close this "case".

Kind regards,

Roxana
 

Users who are viewing this thread

Back
Top Bottom