In SQL Reporting Services, is it possible to retrieve a certain value from a dataset, depending on values of multiple other columns in the same row?
So, if this was my dataset:
Id | Name | Number | Score
1 | "John" | 16 | 22
2 | "Jane" | 64 | 24
3 | "John" | 20 | 18
I would like to have some sort of ‘where’ clause, so I can retrieve all/the value(s) where Name == 'John' and Number == 16 for example. This would then return 22.
I’ve tried LookUpSet, but that will only compare one other column value. I need to compare two.
Actually the way the Lookup functions work is to use expressions for the comparison. So you can do something like this if I understand your problem correctly:
=Lookup(Fields!Name.Value+”-“+CStr(Fields.Number.Value), Fields!Name.Value + “-” + CStr(Fields.Number.Value), Fields!Score.Value,”Dataset2″)