简体   繁体   中英

SSRS Lookup function in chart not displaying value bar for dataset2

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?

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM