Filtering rows in SSRS where columns is 0
Hi Abhishekgandhi,
For filtering your data based on the column values, you can make use of
Filter property of tablix or dataset.
If you are displaying the data in a tablix, go to your parent group properties.
Go to Filter tab, and add expression as:
=Fields!Column1.Value + Fields!Column2.Value + Fields!Column3.Value
These steps can also be followed directly to a dataset.
Regards,
Manoj
*Happy to help
http://experiencingmsbi.blogspot.com/
June 3rd, 2012 11:27am
Hello abhishekgandhi,
In your case, I think that you can implement "Or" logic for filters in the report. For example, if you want to create a filter as the following form: (MyField1= "0") Or (MyField1= Null) You can create a filter with an expression as below:
Expression: =(Fields!MyField1.Value = "0") or (Fields!MyField1.Value = Null)
Operator: =
Value: = TRUE
For more information, you can refer to item 69 "How do I implement OR logic or complicated logics for filters in a SSRS report?" in the link below:
http://blogs.msdn.com/b/sqlforum/archive/2011/06/10/sql-server-faqs-ebook-with-database-engine-ssrs-ssis-ssas-.aspx
Regards,
Bin Long
TechNet Subscriber Support
If you are TechNet Subscription user and have
any feedback on our support quality, please send your feedback here. Bin Long
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
June 4th, 2012 2:27am
Hi Bin
Thanks for your posting. Based on my experience and testing Null will not work in SSRS instead you could use expression
Either
=Fields!Value.Value
is nothing or Fields!Value.Value =0
Or
=Len(Fields!Value.Value)=0
or Fields!Value.Value =0
=Fields!Value.Value is nothing or Fields!Value.Value =0
Or
=Len(Fields!Value.Value)=0 or Fields!Value.Value =0
Both expression will work but you have to make sure that your expression type will be Boolean
I am putting screenshot for help
I hope this will helps
If you have any question please let me know.
Many Thanks
Syed Qazafi Anjum
Please click "Mark as Answer" if this resolves your problem or "Vote as Helpful" if you find it helpful
June 4th, 2012 3:29am
Hello Syed,
Thanks for pointing out my mistakes in this post. You are absolutely right.
Updating the filter definition:
Expression: =(Fields!MyField1.Value = "0") or (Fields!MyField1.Value is nothing)
Operator: =
Value: = TRUE
Regards,
Bin LongBin Long
TechNet Community Support
Free Windows Admin Tool Kit Click here and download it now
June 4th, 2012 3:46am
Hello,
I need to filter the rows in SSRS based on conditions such that the total of 4 columns is 0. The data that is contained in the column can be 0 or NULL.
I am aware of the IsNothing as a SSRS Expression and I need to used that condition under Row Visibility but I'm not sure as to how to use that because the value of that column can be 0 or NULL.
let me know if you need more info from my end.
Best Regards
Abhishek!
June 4th, 2012 6:39am