August 28, 2013 at 8:18 am
Hi,
When calculating the average value, its ignoring the zero values.
For ex: to calculate the average of 10,20,30,0,0 it is calculating as 60/3 instead of 60/5.
Can anyone pls let me know what should be the issue in SSRS
I have given it as
CStr(CDec(Round(Avg(Fields!QUOTE_VAL.Value),2)))
and tried with different conversions in CDec area.
Thanks
Naveen
August 28, 2013 at 10:09 am
Are they really zeros or are they Nulls?
Try adding a check ( [font="Courier New"]IIF()[/font] ) to see if the value is Nothing, if so, explicitly make it zero.
Just a thought,
Rob
August 28, 2013 at 9:43 pm
I have added iif in both stored procedures as isnull(varname,0)
and also in rdl i used iif isnothing(varname,0,varname) but still no luck
Thanks
Naveen
September 3, 2013 at 9:51 am
Perhaps it's inconsistent type of the data it's operating on?
Try changing it to:
CStr(CDec(Round(Avg(Cdbl(Fields!QUOTE_VAL.Value)),2)))
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply