Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
Reporting Services
»
Reporting Services
»
SSRS Indicators Expression
27 posts, Page 1 of 3
1
2
3
»
»»
SSRS Indicators Expression
Rate Topic
Display Mode
Topic Options
Author
Message
davdam8
davdam8
Posted Friday, September 21, 2012 3:43 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Yesterday @ 10:53 AM
Points: 163,
Visits: 612
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
anthony.green
anthony.green
Posted Friday, September 21, 2012 4:05 AM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 2:40 AM
Points: 5,075,
Visits: 4,833
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
davdam8
davdam8
Posted Friday, September 21, 2012 4:12 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Yesterday @ 10:53 AM
Points: 163,
Visits: 612
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
anthony.green
anthony.green
Posted Friday, September 21, 2012 4:22 AM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 2:40 AM
Points: 5,075,
Visits: 4,833
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
davdam8
davdam8
Posted Friday, September 21, 2012 4:36 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Yesterday @ 10:53 AM
Points: 163,
Visits: 612
Certainly the parenthesys have their importance here.
Could you check what you wrote above?
Thanks
Regards
Post #1362539
anthony.green
anthony.green
Posted Friday, September 21, 2012 4:38 AM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 2:40 AM
Points: 5,075,
Visits: 4,833
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
davdam8
davdam8
Posted Friday, September 21, 2012 5:07 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Yesterday @ 10:53 AM
Points: 163,
Visits: 612
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
anthony.green
anthony.green
Posted Friday, September 21, 2012 5:16 AM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 2:40 AM
Points: 5,075,
Visits: 4,833
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
davdam8
davdam8
Posted Friday, September 21, 2012 5:37 AM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Yesterday @ 10:53 AM
Points: 163,
Visits: 612
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
anthony.green
anthony.green
Posted Friday, September 21, 2012 6:00 AM
SSCertifiable
Group: General Forum Members
Last Login: Wednesday, June 05, 2013 2:40 AM
Points: 5,075,
Visits: 4,833
=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 »
27 posts, Page 1 of 3
1
2
3
»
»»
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.