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 12»»

Indicator for to remain in one cell for a group Expand / Collapse
Author
Message
Posted Monday, April 28, 2014 11:50 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 28, 2014 10:54 AM
Points: 26, Visits: 57
In SSRS, I have a drill down report with three columns. One column says 'yes' or 'no.' The other column is for an indicator. And then there is the Group column. Each group will open up their yes or no cells. Is there a way for the indicator to remain in the first cell of each group? I want to be able to look at a Group and if it has an X then I know there must be a 'no' in the yes/no column. I just don't want to open up the group and have an X or check mark next to each 'yes' or 'no.' Thanks!
Post #1565668
Posted Monday, April 28, 2014 1:14 PM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 28, 2014 10:54 AM
Points: 26, Visits: 57
I figured it out by using the Rectangle but now how to make that indicator see the yes/no column. My expression for the indicator corresponding to yes/no/null is:
=Fields!Passed.Value*100
with red: 50 to 100, yellow: 41 to 49, and green: 0 to 40. Somehow this works but now I just want one indicator for a group if an X is present or if there is an exclamation if there are any nulls, else everything should be a yes and therefore a checkmark. Is this an if/else? If so, can anyone point me in the right direction on how to write it. Thanks!
Post #1565684
Posted Monday, April 28, 2014 3:54 PM


SSC-Enthusiastic

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

Group: General Forum Members
Last Login: Wednesday, October 8, 2014 5:53 PM
Points: 143, Visits: 316
Have you tried the concept of drilldown in ssrs? Read this article I wrote on creating a drill down report .. http://sqlsaga.com/ssrs/how-to-create-a-drill-down-report-using-ssrs/

Good Luck :) .. Visit www.sqlsaga.com for more t-sql code snippets and BI related how to articles.
Post #1565723
Posted Tuesday, April 29, 2014 5:05 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 8:50 AM
Points: 7,006, Visits: 7,177
Add an indicator within the group and set it's expression to use SWITCH to return a suitable value to show the relevant indicator
Use IIF to test the field for yes and return 1 or zero, put this in a SUM
Add SUM to the SWITCH and test the value of SUM to be > zero to return a value for the required indicator
Repeat this for no and null

e.g.
=SWITCH(SUM(IIF(Fields!Passed.Value='yes',1,0))>0,1,SUM(IIF(Fields!Passed.Value='no',1,0))>0,2,True,3)
(Set the indicators test ranges to 1,2 and 3 accordingly)






Far away is close at hand in the images of elsewhere.

Anon.

Post #1565851
Posted Wednesday, April 30, 2014 7:39 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 28, 2014 10:54 AM
Points: 26, Visits: 57
I don't think the SUM will work in this case because there is a mix of indicators with values of 0, -1, 1. For the individual indicators I have: =CInt(IIF(Fields!Passed.Value, 1, iif(Fields!Passed.Value is nothing, -1, 0))) and this works fine. So for the Group column I need it to find if there is first, a 0 in the group of indicators, and display that but if there is also a -1, then display that instead. If neither are present, then it must all be a 1. Here is what I have: =Min(CInt(IIF(Fields!Passed.Value is nothing, 0, iif(Fields!Passed.Value, -1, 1)))) which is not working properly especially when there is all of one kind. Could it be the order that I have them in?
Post #1566394
Posted Wednesday, April 30, 2014 8:07 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 8:50 AM
Points: 7,006, Visits: 7,177
Try this

=Switch(Sum(IIf(Fields!Passed.Value, 1, 0))>0,1,Sum(IIf(IsNothing(Fields!Passed.Value), 1, 0))>0,-1,True,0)



Far away is close at hand in the images of elsewhere.

Anon.

Post #1566413
Posted Wednesday, April 30, 2014 8:40 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 28, 2014 10:54 AM
Points: 26, Visits: 57
Thanks but it doesn't work. If a 1 appears before a 0, it stops and only displays the 1. I need it to search for a 0 first, then -1, then 1. So I was thinking the MIN function would do the search but with a little switch of the 0 and -1 so 0 is the MIN. Or, if that's not possible, then to switch the ranges in the indicator fields.
Post #1566430
Posted Wednesday, April 30, 2014 8:52 AM This worked for the OP Answer marked as solution


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 8:50 AM
Points: 7,006, Visits: 7,177
How about this

=Switch(Sum(IIf(IsNothing(Fields!Passed.Value), 0, IIf(Fields!Passed.Value, 0, 1)))>0,0,Sum(IIf(IsNothing(Fields!Passed.Value), 1, 0))>0,-1,True,1)



Far away is close at hand in the images of elsewhere.

Anon.

Post #1566433
Posted Wednesday, April 30, 2014 9:47 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Monday, July 28, 2014 10:54 AM
Points: 26, Visits: 57
It looks like it works! Thank you so much! Can you explain to me why you use SUM instead of MIN?
Post #1566471
Posted Wednesday, April 30, 2014 10:09 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 8:50 AM
Points: 7,006, Visits: 7,177
giszzmo (4/30/2014)
It looks like it works! Thank you so much! Can you explain to me why you use SUM instead of MIN?

Because MIN will not obey 0, -1, 1 order
If the dataset contained entries for all three values (true, false and NULL) you would have values 1, 0 and -1 and MIN would return -1 not 0 as you wanted

*Edited*

if you want to use MIN then you would have to use the values 1, 2 and 3 in the correct order and change the indicator ranges



Far away is close at hand in the images of elsewhere.

Anon.

Post #1566484
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse