November 27, 2014 at 11:09 am
Hi,
I´m trying to insert an indicator which compares the actual and previous value of a field.
=IIf(Fields!Citrix100.Value < Previous(Fields!Citrix100.Value), "Red", "Green")
Following error raises:
Der Value-Ausdruck für Messgerätbereich 'GaugePanel5' verwendet eine Previous-Funktion in einem äußeren Aggregat. Previous-Funktionen können nicht als geschachtelte Aggregate angegeben werden.
Whats wrong?
hsch1
November 27, 2014 at 6:32 pm
I'm confused. When I put an indicator into my report, it gives me ranges for Red, Yellow, Green. I tried a couple to see if I could recreate what you're seeing and couldn't do it. If you go into the Value and States section of the indicator, what does it show?
November 28, 2014 at 8:21 am
Sorry, it´s part of a table. The indicator shall show the diffenrence between current und previous value in field "Citrix100"...
indicator value=
=IIf(Fields!Citrix100.Value < Previous(Fields!Citrix100.Value), "Red", "Green")
November 28, 2014 at 7:15 pm
I'm still confused. Are you changing the backcolor of your cell with that? Otherwise, I'm afraid your approach doesn't make sense to me.
Something like this in the BackgroundColor should do it:
=IIF(Fields!DaysSincePrevious.Value>150,"Green",IIF(Fields!DaysSincePrevious.Value>100,"Yellow","Red"))
(Worked on my report, anyway.)
Does that help?
December 1, 2014 at 7:53 am
I try to explain the issue 🙂
the table have three columns.
In "week" the current an the past 4 weeks are stored.
Value is the value of the week.
Indicator shall show the difference to the previous week.
Value higher = indicator "green", value lower = indicator "red". Like a trend function.
-- Excuse my poor English --
week | value | indicator
49 | 28 | green
48 | 25 | red
47 | 27 | green
46 | 23 | green
45 | 20 | -
December 1, 2014 at 12:24 pm
Your English is fine! (the sample data is a huge help!)
Here's the sample data in a useable format:
SELECT 49 AS WeekNo, 28 AS Value
UNION ALL
SELECT 48 AS Expr1, 25 AS Expr2
UNION ALL
SELECT 47 AS Expr1, 27 AS Expr2
UNION ALL
SELECT 46 AS Expr1, 23 AS Expr2
UNION ALL
SELECT 45 AS Expr1, 20 AS Expr2
To get this to work, this is what I did:
1. add a table to the report
2. Add WeekNo and Value to the table.
3. Add a third column to the right of WeekNo. (I called it Delta). Use this expression as the source for it:
=IIF(IsNothing(Previous(Fields!Value.Value)),"",Fields!Value.Value-Previous(Fields!Value.Value))
4. Add a fourth column to the tablix.
5. Put an Indicator in the right-most column.
Value: =IIF(IsNothing(Previous(Fields!Value.Value)),"",Fields!Value.Value-Previous(Fields!Value.Value))
States measurement unit: Numeric
Indicator States: RED: -1000 to -1
YELLOW: 0 to 0
GREEN: 1 to 1000
Does that help?
Pieter
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply