Reputation: 360
I am trying to make a bar chart to represent the logging hours of an employee. is it possible through SSRS ??
Here is a sample database structure and values , I want the "Name" in X axis and Y axis can be the Hours.
Upvotes: 0
Views: 37
Reputation: 10066
One workaround is creating a cross join in your query to create a dummy grouping for the stacked bar chart.
My sample Dataset:
SELECT
name,
CASE WHEN chartgroup = 1 THEN estimated END AS estimated,
CASE WHEN chartgroup = 2 THEN actual END AS actual,
CASE WHEN chartgroup = 1 THEN diff END AS diff,
chartgroup
FROM (
select 'alan' as name, 120 as 'estimated', 138 as 'actual', 50 as diff
union all
select 'elsa' as name, 130 as 'estimated', 162 as 'actual', 38 as diff
) d
CROSS JOIN
(
SELECT 1 AS chartgroup
UNION ALL
SELECT 2
) c
Create your chart to group on name and the dummy group like in the image below
Your result will look like as the image below
Upvotes: 2