SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Analysis Server and Reporting Services (2008)
 Change Indicators by formula
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

sz1
Constraint Violating Yak Guru

United Kingdom
439 Posts

Posted - 12/18/2012 :  10:26:12  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

5155 Posts

Posted - 12/18/2012 :  11:33:03  Show Profile  Reply with Quote
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
Constraint Violating Yak Guru

United Kingdom
439 Posts

Posted - 12/18/2012 :  11:55:50  Show Profile  Reply with Quote
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
Constraint Violating Yak Guru

United Kingdom
439 Posts

Posted - 12/18/2012 :  12:02:11  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

5155 Posts

Posted - 12/18/2012 :  13:45:53  Show Profile  Reply with Quote
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
Constraint Violating Yak Guru

United Kingdom
439 Posts

Posted - 12/19/2012 :  06:32:32  Show Profile  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000