Are you writing this aggregation as an SQL statement. Did you use Group By clause in the end ?
SUM(IF(SO_AD_SEG_MET.w_prd_dt='2016-04-01',SO_AD_SEG_MET.metric_value)) AS test
GROUP BY Col1, Col2......
Something like this. Can you post the whole script statement you are using and the error you are getting?