2013-09-27 180 views
0

我有SSRS 2008 R2中的列图图表,现在我想以百分比形式显示值。目前它只显示总数。我的数据集的样子:如何在列图图表上创建百分比?

people_count facility met_reqs 
12 Chattanooga, TN 0 
9 Clarksville, TN 0 
6 Columbia, TN 0 
51 Chattanooga, TN 1 
22 Clarksville, TN 1 
28 Columbia, TN 1 

正如你所看到的,每个城市都有两行:第一行是谁不符合要求,第二行是每个城市,曾经相遇请求数人的数量。

Where my last query is: 
select 
count(distinct people_id) as people_count, 
facility, 
case when total_los/total_visits *3/7 >= 1 then 1 else 0 end met_reqs 
from #final 
group by facility, case when total_los/total_visits *3/7 >= 1 then 1 else 0 end 

目前我有这个图表显示PEOPLE_COUNT对图表值,类别组=设施和系列组= met_reqs的总和。

这看起来像: enter image description here

但现在对于Y轴我想这不是谁显示符合要求的人/机构的百分比。我怎样才能做到这一点?所以Y轴应该有0-100%的范围。

回答

1

你有没有考虑过100%Stacked Column chart?

enter image description here

如果您改变现有的设置,这似乎达到您的要求:

enter image description here

enter image description here

enter image description here

如果这是你没有什么之后,你可以请更新你的问题有更多的细节?

编辑点评

确定后,为满足只显示%实现了要求的具体要求。具有相同的数据集,使用(即第一个选项)图表类型和除去系列组

enter image description here

enter image description here

更改表达式:

=Sum(IIf(Fields!met_reqs.Value = 1, Fields!people_count.Value, Nothing)) 
    /Sum(Fields!people_count.Value) 

即获得总数的百分比people_count其中met_reqs = 相比于每个组中总共people_count

为了完整起见,我将Y轴上的数字格式更改为百分比。

这看起来OK对我说:

enter image description here

希望这有助于得到一点更接近球门。

+0

谢谢。好主意,但她只想看到符合预期的%。我怎么能这样做? – salvationishere

+0

好吧,我已经添加了一些更多细节 - 希望这对你有用? –

+1

超级!!!这工作完美!非常感谢! – salvationishere