September 29, 2014 at 7:04 am
I need some help with a function. I want to be able to determine if 3 columns in my report are equal to each other. In Excel, I have a formula that works and it looks like;
=IF(VAR(H4:J4)=0,"Please Close","Open")
I was hoping to perform the same type of operation in SSRS. Any ideas are appreciated.
Thanks
September 29, 2014 at 7:13 am
The thing is that in Excel you are not actually comparing 3 columns, you are comparing 3 values (which happens to be in 3 different columns).
There is a VAR function in SSRS as well, but you can only calculate the variance over an expression, not over 3 different columns.
Since there are only 3 columns, you can construct something using IIF to check if the columns are the same or not.
Need an answer? No, you need a question
My blog at https://sqlkover.com.
MCSE Business Intelligence - Microsoft Data Platform MVP
October 4, 2014 at 10:25 pm
You can use the ReportItems collection in your SSRS expression, in a similar way that you would refer to columns in Excel.
For example, if the first field in the SSRS table is called Textbox1, and the second field is called Textbox2, you could compare if Textbox2 is equal to Textbox1.
=iif(ReportItems!Textbox1.Value=ReportItems!Textbox2.Value,"Closed","Open")
Noah Meyer
www.sqlfixitguy.com
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply