Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 123»»»

SSRS Indicators Expression Expand / Collapse
Author
Message
Posted Friday, September 21, 2012 3:43 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

Hi geniuses, I'm stuck here with some indicators.

Here is my table:

[valueType] | [Value]
Allocation | 3000000
Value Planned | 5000000

I have to use a 4 Traffic Lights indicator where:

Green if Allocation >= Value Planned
Yellow if Allocation/Value Planned is > 0,7 and < 1
Red if Allocation/Value Planned is < 0,7
White if Value Planned is = 0

For the expression
Dataset: DataSet2BFM
valueType field name: valueType
Value field name: Value

The big problem i'm facing here is the indicator expression.

Thanks in advance!

Regards
Post #1362509
Posted Friday, September 21, 2012 4:05 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:10 AM
Points: 5,216, Visits: 5,108
Is the table split over two rows as shown or is it split over 4 columns?

Also will the table only ever have the same two values in it, one for allocation the other value planned?




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1362519
Posted Friday, September 21, 2012 4:12 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

2 Columns and a valueType has a respective value.
And what I need is to compare the value from allocation and the one from Value Planned.

Post #1362522
Posted Friday, September 21, 2012 4:22 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:10 AM
Points: 5,216, Visits: 5,108
So something like should do the trick

=SWITCH
(
LAST(Fields.Value.Value "DataSetName") = 0, "White",
FIRST(Fields!Value.Value "DataSetName) >= LAST(Fields!Value.Value "DataSetName"), "Green",
(FIRST(Fields!Value.Value "DataSetName) / LAST(Fields!Value.Value "DataSetName")) >= 0.7, "Yellow",
(FIRST(Fields!Value.Value "DataSetName) / LAST(Fields!Value.Value "DataSetName")) < 0.7, "Red"
)

Would need to ensure that the table is ordered so that Allocation is the first value and Value Planned is the last value.




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1362530
Posted Friday, September 21, 2012 4:36 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

Certainly the parenthesys have their importance here.
Could you check what you wrote above?
Thanks

Regards
Post #1362539
Posted Friday, September 21, 2012 4:38 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:10 AM
Points: 5,216, Visits: 5,108
Looks fine to me



Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1362540
Posted Friday, September 21, 2012 5:07 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

OK, It is not working, but your suggestion brought me an ideia.
It is possible to use an indicator expression where - if the value from 'Textbox1'="Green" - show green indicator.

I'm learning here, sorry if my questions expose stupidity!

Thanks
Regards
Post #1362555
Posted Friday, September 21, 2012 5:16 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:10 AM
Points: 5,216, Visits: 5,108
Try this instead

missed a few , and " out

=SWITCH
(
LAST(Fields!Value.Value, "DataSet1") = 0, "White",
FIRST(Fields!Value.Value, "DataSet1") >= LAST(Fields!Value.Value, "DataSet1"), "Green",
(FIRST(Fields!Value.Value, "DataSet1") / LAST(Fields!Value.Value, "DataSet1")) >= 0.7, "Yellow",
(FIRST(Fields!Value.Value, "DataSet1") / LAST(Fields!Value.Value, "DataSet1")) < 0.7, "Red"
)




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1362561
Posted Friday, September 21, 2012 5:37 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Tuesday, December 24, 2013 4:56 AM
Points: 178, Visits: 668

OK thanks. But still not working.
Change of plan!
Table:
[valueType]|[Value]|[Expr1]|[Expr2]|[INDICATOR(4TrafficLights)]
[Allocation]|[3000000]|[ValuePlanned]|[5000000]

This way it may be easier, no?
With same conditions.
Can you write me the expression for this example?

Thanks!
Post #1362574
Posted Friday, September 21, 2012 6:00 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:10 AM
Points: 5,216, Visits: 5,108
=SWITCH
(
LAST(Fields!Value.Value, "DataSet1") = 0, 0,
FIRST(Fields!Value.Value, "DataSet1") >= LAST(Fields!Value.Value, "DataSet1"), 3,
(FIRST(Fields!Value.Value, "DataSet1") / LAST(Fields!Value.Value, "DataSet1")) >= 0.7, 2
(FIRST(Fields!Value.Value, "DataSet1") / LAST(Fields!Value.Value, "DataSet1")) < 0.7, 1
)


You should just need to substitute the word to a number then set the start and end range for each colour in the indicator to the right value

Had my head in background colours as been working on changing cells to different colours based on values all day.




Want an answer fast? Try here
How to post data/code for the best help - Jeff Moden
Need a string splitter, try this - Jeff Moden
How to post performance problems - Gail Shaw
CrossTabs-Part1 & Part2 - Jeff Moden
SQL Server Backup, Integrity Check, and Index and Statistics Maintenance - Ola Hallengren
Managing Transaction Logs - Gail Shaw
Troubleshooting SQL Server: A Guide for the Accidental DBA - Jonathan Kehayias and Ted Krueger

Post #1362585
« Prev Topic | Next Topic »

Add to briefcase 123»»»

Permissions Expand / Collapse