Today I use LookUp function of SSRS in one scenario as: I have two different amount (Total Amount and Total Volume) based on the different date values so i have created two different dataset as dataset1 and dataset2 and in both dataset we have a date column which is similar in both dataset so in the report I have created a tablix to show data from first dataset based on the Logged date and in one column I wrote an expression to get value from second dataset based on the transactionDate which is similar as Loggeddate in first dataset so I used below expression in the textbox :
=LookUp(Fields!LoggedFirstDayOfMonth.Value,Fields!TransDateFirstDayOfMonth.Value,Fields!TotalAmount.Value, "Dataset2")
So here "Fields!LoggedFirstDayOfMonth.Value" is coming from first dataset and second argument "Fields!TransDateFirstDayOfMonth.Value" is coming from second dataset and last third argument is that column which will be used for display amount in that textbox.
Below is the good link for Lookup and LookUpset function in SSRS:
LookUp and LookUpSet Functions New in SSRS 2008 R2
=LookUp(Fields!LoggedFirstDayOfMonth.Value,Fields!TransDateFirstDayOfMonth.Value,Fields!TotalAmount.Value, "Dataset2")
So here "Fields!LoggedFirstDayOfMonth.Value" is coming from first dataset and second argument "Fields!TransDateFirstDayOfMonth.Value" is coming from second dataset and last third argument is that column which will be used for display amount in that textbox.
Logged Month | Total Volume on Logged date | Total Amount on Transaction Date |
Sep 2013 | $13,850 | $1,007 |
Oct 2013 | $14,903 | $8,214 |
Nov 2013 | $13,632 | $2,747 |
Dec 2013 | $14,405 | $1,711 |
Below is the good link for Lookup and LookUpset function in SSRS:
LookUp and LookUpSet Functions New in SSRS 2008 R2
An awesome blog for the freshers. Thanks for posting this information.
ReplyDeleteMsbi Developer Course
Best Msbi Online Training