Showing posts with label percentage. Show all posts
Showing posts with label percentage. Show all posts

Monday, March 12, 2012

Expressions in RS

Hi,
Im using the following expression to calculate the percentage
=iif(Fields!BudgetedRevenue.Value = 0,0,(Fields!BudgetedRevenue.Value-
Fields!BudgetedCostStan.Value- Fields!BudgetedCostOT.Value-
Fields!BudgetedCostExp.Value)/ Fields!BudgetedRevenue.Value)
if the Fields!BudgetedRevenue.Value = 0 it is returning the #error,instead
of 0.
Fields!BudgetedRevenue.Value is of datatype money.
Thanks in advance.Try using this:
=iif(isnothing(Fields!BudgetedRevenue.Value),0,(Fields!BudgetedRevenue.Value-
Fields!BudgetedCostStan.Value- Fields!BudgetedCostOT.Value-
Fields!BudgetedCostExp.Value)/ Fields!BudgetedRevenue.Value)
I belive the isnothing() should take the place of the = 0 and might help
your formula calculate correctly.
Let me know if that didn't work.
Catadmin
--
MCDBA, MCSA
Random Thoughts: If a person is Microsoft Certified, does that mean that
Microsoft pays the bills for the funny white jackets that tie in the back?
@.=)
"CCP" wrote:
> Hi,
> Im using the following expression to calculate the percentage
> =iif(Fields!BudgetedRevenue.Value = 0,0,(Fields!BudgetedRevenue.Value-
> Fields!BudgetedCostStan.Value- Fields!BudgetedCostOT.Value-
> Fields!BudgetedCostExp.Value)/ Fields!BudgetedRevenue.Value)
> if the Fields!BudgetedRevenue.Value = 0 it is returning the #error,instead
> of 0.
> Fields!BudgetedRevenue.Value is of datatype money.
> Thanks in advance.

Friday, March 9, 2012

Expression problem

Using this expression to get the percentage of two fields. The problem is
when both fields contain values of 0 then I get 'NaN%' .
How can I rewrite the expression to give 0%
=ROUND(((SUM(Fields!P2_OPENED.Value)/SUM(Fields!P2_CLOSED.Value)) *100),2) &
"%" & vbcrlf & ""
Thanks,=IIF(SUM(Fields!P2_CLOSED.Value) <> 0,
ROUND(((SUM(Fields!P2_OPENED.Value)/SUM(Fields!P2_CLOSED.Value)) *100),2) ,
0) &
"%" & vbcrlf & ""
"cheilig" wrote:
> Using this expression to get the percentage of two fields. The problem is
> when both fields contain values of 0 then I get 'NaN%' .
> How can I rewrite the expression to give 0%
> =ROUND(((SUM(Fields!P2_OPENED.Value)/SUM(Fields!P2_CLOSED.Value)) *100),2) &
> "%" & vbcrlf & ""
> Thanks,
>