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

Values > 0 in Expression Expand / Collapse
Author
Message
Posted Wednesday, February 26, 2014 9:41 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 8:52 AM
Points: 253, Visits: 761
I only want to see all the values in the column which are greater than 0. I don't want to put it in the where clause(Query) because there is a lookup based on that . But want to display in the table only the one's which are > 0.
How can I achieve this?
Post #1545469
Posted Wednesday, February 26, 2014 10:10 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 7:50 AM
Points: 1,234, Visits: 1,273
sharonsql2013 (2/26/2014)
I only want to see all the values in the column which are greater than 0. I don't want to put it in the where clause(Query) because there is a lookup based on that . But want to display in the table only the one's which are > 0.
How can I achieve this?

Use an expression, give IIF() a look. Something like:

=IIF(Fields!YourColumn.Value > 0, Fields!YourColumn.Value, "")

HTH,
Rob

Edit -- I can't get the > (greater than) sign to display above. Just replace the > with a > sign.
Post #1545484
Posted Wednesday, February 26, 2014 2:39 PM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: 2 days ago @ 8:52 AM
Points: 253, Visits: 761
Thanks.
The Thing is the IIF Clause returns blank row if the value is not meeting the condition. I am looking for it to not to display that row if the condition is not met.
Post #1545598
Posted Wednesday, February 26, 2014 6:40 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Yesterday @ 7:50 AM
Points: 1,234, Visits: 1,273
Try putting that expression in the Visibility for that group. You want the IIF() to evaluate as either True or False (for visible or not).

HTH,
Rob
Post #1545660
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse