I have a query to result in the below data from DB
But actually, I want to get the data as
Is there any way we can do this the SSRS? How can I do this? really stuck
CodePudding user response:
You can do this easily in SSRS without changing your dataset.
- Add a Matrix control to your report
- Drag the Assignee field to the
Rows
placeholder - Drag the Priority_n field to the
Columns
placeholder - Drag the Count_C field to the
Data
placeholder
that's it. If this does not help, let me know and I will update with sample images.
CodePudding user response:
Please recheck the column names;
SELECT * FROM (
SELECT
[Assignee],
[Priority_n],
[Count_C]
FROM dataset
) Results
PIVOT (
SUM([Count_C])
FOR [Priority_n]
IN (
[High],
[Medium],
[Low]
)
) AS PivotTable