Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Change Indicators by formula

Author  Topic 

sz1
Aged Yak Warrior

555 Posts

Posted - 2012-12-18 : 10:26:12
Hi,

I have some indicators I want to change to red, green, amber...depending on what the value in the previous text box is, if its lower got to amber if higher go to red indicator. Can this be done? if so, would someone kindly point me in the right direction.

Thanks
S

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-12-18 : 11:33:03
If they are all text boxes, you would have to write the formula for each text box. If it is in a table/tablix, you can use the function "Previous" to get the value in the previous row and use that to write the formula.
=IIF(Previous(Fields!Yourcolumn.Value)>Fields!Yourcolumn.Value,"Red","Green")
Go to Top of Page

sz1
Aged Yak Warrior

555 Posts

Posted - 2012-12-18 : 11:55:50
Hi

They are in previous column but they are all expressions within the table column cells...will try the previous command you have advised...

Thanks
Go to Top of Page

sz1
Aged Yak Warrior

555 Posts

Posted - 2012-12-18 : 12:02:11
I tried doing this:

=Iff(Previous(Fields!percentage.Value)>Fields!percentagelast.Value,"Red","Green")

I named the first header percentage and the second one percentagelast. then I right clicked the indicator and selected expression at the bottom of all other available fields, is this correct it throws an error, do I need the actual column name and not the header name of the data...

Thanks
Go to Top of Page

sunitabeck
Master Smack Fu Yak Hacker

5155 Posts

Posted - 2012-12-18 : 13:45:53
I didn't quite follow what you did - what I think could be done is to add the indicator to whichever column you choose, and in the indicator properties, Values and States tab, set value to Previous(Fields!percentage.Value)>Fields!percentagelast.Value. Then change the colors based on whether the value is less than 0 or greater than zero etc. In my previous reply, I had missed the fact that you were using an indicator rather than a background color or text color.
Go to Top of Page

sz1
Aged Yak Warrior

555 Posts

Posted - 2012-12-19 : 06:32:32
Agh sorry my wording, I tried that but I get an error of:

System.Web.Services.Protocols.SoapException: The Value expression for the gauge panel ‘GaugePanel1’ uses a Previous function in an outer aggregate. Previous functions cannot be specified as nested aggregates.

Go to Top of Page
   

- Advertisement -