Question

I need to implement the following expression in a tablix:

1.NewReatil < cost then " NR is below cost"

2.% Change >=20% then " NR is >=20%"

Here % change is a derived column.

I tried:

=Switch(Fields!NEW_RETAIL.Value < Fields!PC.Value, "New Retail is below cost", ReportItems!Change.Value >= 20%, "New retail is >=20%")

and

=IIF(Fields!NEW_RETAIL.Value < Fields!PC.Value, "New Retail is below cost", IIF(ReportItems!Change.Value >= 20%, "New retail is >=20%")," ")

But both do not work!

Help needed asap!!

Was it helpful?

Solution

"20%" is string, and the expression "> 20%" does not really have meaning (Even if it did, 20% of what?)

Try

 =IIF(
   Fields!NEW_RETAIL.Value < Fields!PC.Value, "New Retail is below cost",
  IIF(ReportItems!Change.Value >= 20, "New retail is >=20%"," "))

Check to see that ReportItems!Change.Value has a number in it, as well. (It might be formatted as a percent with a textbox format, but the value should still be a number, not a string with "%" at the end.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top