SSRS - 图表 - 消除数据造成的差距

时间:2013-05-13 21:15:52

标签: reporting-services bar-chart

我尝试从条形图中删除间隙时需要帮助。

数据集查询:

SELECT 'Excused' as Type, '9120' as Total, '< 5' as CountRange
UNION
SELECT 'Unexcused' as Type, '11540' as Total, '< 5' as CountRange
UNION
SELECT 'Excused' as Type, '10990' as Total, '5 - 9' as CountRange
UNION
SELECT 'Unexcused' as Type, '2966' as Total, '5 - 9' as CountRange
UNION
SELECT 'Excused' as Type, '6513' as Total, '10 - 14' as CountRange
UNION
SELECT 'Unexcused' as Type, '1101' as Total, '10 - 14' as CountRange
UNION
SELECT 'Excused' as Type, '3277' as Total, '15 - 20' as CountRange
UNION
SELECT 'Unexcused' as Type, '537' as Total, '15 - 20' as CountRange
UNION
SELECT 'Excused' as Type, '2195' as Total, '> 20' as CountRange
UNION
SELECT 'Unexcused' as Type, '627' as Total, '> 20' as CountRange
UNION
SELECT 'Perfect Attendance' as Type, '1401' as Total, ' ' as CountRange

数据字段=总计(不是默认的计数(总计))

系列=类型

Category = CountRange

如果我删除了具有“完美出勤”的最后一个UNION,则类别分组正是我希望它看起来的样子。当我介绍最后一个UNION时,它会在每个类别分组上给我一个空白列。它也给了我最后一组的两个空白。

我尝试了多种方法来尝试过滤掉由于最后一个联盟而发生的空白,但我似乎无法找到正确的方法来做到这一点。 SSRS不是我通常工作的地方所以这可能是一件非常简单的事情,我还没有偶然发现,或者在搜索解决方案时使用了正确的关键字。

我想要的结果是看到'&lt; 5','5 - 9','10 -14','15 - 20'和'&gt; 20'所有人都有'原谅'和'无条件'的酒吧,然后''拥有自己的“完美出勤”酒吧。目前看起来每个分组都有一个额外的“完美出勤”栏。

Chart With Gaps Older Image, but ideal Way That I'd like to see the data show up

1 个答案:

答案 0 :(得分:0)

只要符合您的需要,叠加的条形图就会给您带来的效果:

enter image description here