1
votes

I have two identical datasets, except that dataset1 returns this years figures and dataset2 last years figures. They are displayed in two separate tables and work well but when I want to display them in a single chart the values from dataset2 are not displayed, no error either, the Total column from dataset1 is displaying correctly.

Using the lookup function like this:

=Lookup(Fields!Month_Name.Value, Fields!Month_Name.Value, Fields!Total.Value, "dataset2")

What would I need to change to make it work correctly?

1
which version of ssrs you are using?Sandeep
We are using SQL 2012 SP1sams

1 Answers

0
votes

Little late for an answer, but since it doesn't look like it was ever answered I will give it a go.

Since you say it isn't showing an error, just not returning a value, I would have to lean towards the problem being that no match was found in the LOOKUP. Typically when using a LOOKUP it does an exact match, so if it isn't returning anything or returning unexpected values, my guess would have to be that the LOOKUP function isn't finding a match in the destination dataset with the supplied column from the source dataset. Upper-case, lower-case, blanks, carriage returns, and so on can all have an affect on how well the LOOKUP function works, so may want to look there.

Here is the MSDN for the LOOKUP function for further reference: https://msdn.microsoft.com/en-us/library/ee210531.aspx