sum(iif(Fields!PDDAYS.Value>30, Fields!CBAL.Value,0) ) does not look right to
me .
I guess it depends on where this formula is in the grouping but try this
iif(Sum(Fields!PDDAYS.Value)>30, sum(Fields!CBAL.Value),0) )
or
iif(Fields!PDDAYS.Value>30, sum(Fields!CBAL.Value),0)
[quoted text, click to view] "SLB" wrote:
> No that did not work, but I have been finding problems with this and I think
> the answer is to create the column in the query and then sum that up..Seems a
> little flakey.
>
> "Jaime Stuardo" wrote:
>
> > You have placed parenthesis in the wrong order. I think it should be:
> >
> > =sum(iif(Fields!PDDAYS.Value>30, Fields!CBAL.Value,0) )
> >
> >
> > "SLB" <SLB@discussions.microsoft.com> wrote in message
> > news:B2E2296A-3DA1-489B-BD5D-8CF7C42EB647@microsoft.com...
> > > =sum(iif(Fields!PDDAYS.Value>30, Fields!CBAL.Value),0)
> > >
> > > It returns #ERROR
> > >
> > > Isdbnull did not seem to work and the LEN thing did not seem to do it, but
> > > maybe I am not using them right. Help!
> >
> >
SLB,
I agree about this not working correctly. I have a similar formula in a
group where I would like to reference two other summed fields in the same
group (like this):
=IIf(sum(Fields!curr_schd_amount.Value) = 0, 0,
(sum(Fields!curr_recg_amount.Value) / sum(Fields!curr_schd_amount.Value)) *
100)
I get #error as well. It is almost as if the code not honoring the If check
and processing the division anyway.
[quoted text, click to view] "SLB" wrote:
> =sum(iif(Fields!PDDAYS.Value>30, Fields!CBAL.Value),0)
>
> It returns #ERROR
>
> Isdbnull did not seem to work and the LEN thing did not seem to do it, but
Bruce,
Thank you. I will give this a try.
Brian
[quoted text, click to view] "Bruce L-C [MVP]" wrote:
> IIF evaluates both values. So it cann't be used to prevent divide by zero
> for example.
>
> you could use code behind to do this. pass in the value and use if then else
> to do your calculation and return the appropriate value.
>
>
> --
> Bruce Loehle-Conger
> MVP SQL Server Reporting Services
>
> "Brian P" <BrianP@discussions.microsoft.com> wrote in message
> news:C48571E4-B127-461D-9794-F67408137B40@microsoft.com...
> > SLB,
> >
> > I agree about this not working correctly. I have a similar formula in a
> > group where I would like to reference two other summed fields in the same
> > group (like this):
> >
> > =IIf(sum(Fields!curr_schd_amount.Value) = 0, 0,
> > (sum(Fields!curr_recg_amount.Value) / sum(Fields!curr_schd_amount.Value))
> > *
> > 100)
> >
> > I get #error as well. It is almost as if the code not honoring the If
> > check
> > and processing the division anyway.
> >
> > "SLB" wrote:
> >
> >> =sum(iif(Fields!PDDAYS.Value>30, Fields!CBAL.Value),0)
> >>
> >> It returns #ERROR
> >>
> >> Isdbnull did not seem to work and the LEN thing did not seem to do it,
> >> but
> >> maybe I am not using them right. Help!
>
>
IIF evaluates both values. So it cann't be used to prevent divide by zero
for example.
you could use code behind to do this. pass in the value and use if then else
to do your calculation and return the appropriate value.
--
Bruce Loehle-Conger
MVP SQL Server Reporting Services
[quoted text, click to view] "Brian P" <BrianP@discussions.microsoft.com> wrote in message
news:C48571E4-B127-461D-9794-F67408137B40@microsoft.com...
> SLB,
>
> I agree about this not working correctly. I have a similar formula in a
> group where I would like to reference two other summed fields in the same
> group (like this):
>
> =IIf(sum(Fields!curr_schd_amount.Value) = 0, 0,
> (sum(Fields!curr_recg_amount.Value) / sum(Fields!curr_schd_amount.Value))
> *
> 100)
>
> I get #error as well. It is almost as if the code not honoring the If
> check
> and processing the division anyway.
>
> "SLB" wrote:
>
>> =sum(iif(Fields!PDDAYS.Value>30, Fields!CBAL.Value),0)
>>
>> It returns #ERROR
>>
>> Isdbnull did not seem to work and the LEN thing did not seem to do it,
>> but
>> maybe I am not using them right. Help!
Don't see what you're looking for? Try a search.