Hi,
I have a SQL Logic like I have mentioned below.
casewhen ( [ParameterName] = @ParamName OR [ParameterName] = @ParamName3 OR [ParameterName]=@ParamName4 OR [ParameterName]=@ParamName5) THEN
CAST(AVG( ( ISNULL([1],0) + ISNULL([2],0) + ISNULL([3],0)))as DECIMAL(18,2))/3
Now I want to find AVG of values of only >0 , ie if any of the above values are 0 I want to exclude it from the AVG .
like for eg: (1+0+4) then I must be able to AVg = (1+4)/2
OTHERWISE 1+3+4 THEN avg= (1+3+4)/3
tHANKS in advance
-pep