Forum Discussion
2 datasets in Paginated reports using parameters
Hi, Karolina411
DataSet1 gets the detailed data filtered by YearMonth and PhysicianOrganization.
SELECT
[PhysicianOrganization],
[YearMonth],
[MeasureDescription],
[AllowedPMPMYTD]
FROM
[YourTable]
WHERE
[YearMonth] = @YearMonth
AND [PhysicianOrganization] = @PhysicianOrganization
DataSet2 gets the overall HFPN data filtered by YearMonth.
SELECT
[YearMonth],
[HFPN_Overall_AllowedPMPMYTD]
FROM
[YourOverallTable]
WHERE
[YearMonth] = @YearMonthCreate a parameter @YearMonth and link it to the @PhysicianOrganization dataset.
Create a table in the report and bind it to DataSet1.
Use the LOOKUP function in the table to get the HFPN overall score from DataSet2. Here is an example of how to use the LOOKUP function in a table in Report Builder:
=Lookup(Fields!YearMonth.Value, Fields!YearMonth.Value, Fields!HFPN_Overall_AllowedPMPMYTD.Value, "DataSet2")Add a table to your report and bind it to DataSet1.
Add columns for the measures Description, Rate, and HFPN Overall.
In the HFPN Overall column, use the LOOKUP function that I mentioned earlier.
If this post helps, then please consider Accept it as the solution and kudos to this post to help the other members find it more quickly