I am looking to sum a datatable when certain fields match a criteria. I have the follwing fields in my table TOTAL, ORDER_TYPE. I want to able to sum all fields with the ORDER_TYPE = 'Sale', ORDER_TYPE = 'Charge' AND NOT ORDER_TYPE = 'None'. Can I do this with limited syntax of the filter expression? I can't seem to get it to work properly with the following
objDT.Compute("SUM(TOTAL)", "ORDER_TYPE = 'Sale' AND ORDER_TYPE = 'Charge' AND NOT ORDER_TYPE = 'None'");
I don't get an error with this expression, it just returns 0, and it should not be 0.
How would I filter this properly?
Thanks
objDT.Compute("SUM(TOTAL)", "ORDER_TYPE = 'Sale' AND ORDER_TYPE = 'Charge' AND NOT ORDER_TYPE = 'None'");
I don't get an error with this expression, it just returns 0, and it should not be 0.
How would I filter this properly?
Thanks