【问题标题】:ssrs stacked column chart percentage displayssrs堆积柱形图百分比显示
【发布时间】:2015-03-31 17:05:26
【问题描述】:

-在 Sql 中,我的数据集显示如下:

   MonthName, Type, MonthNumber, YearNumber, Deals
   Feb        used      2          2015      40
   Feb        New       2          2015      30
   Mar        Used      3          2015      50
   Mar        New       3          2015      20

-在我的堆积柱形图中:
值:总和(交易)
类别组:月份名称
SeriesGroup:类型

抱歉,我无法上传图片。所以,我将解释图表。
- 在堆积柱形图中,我要栏显示%:

the bar of Feb: 40/(40+30)=57%
           Feb: 30/(40+30)=43%    
the bar of Mar: 50/(50+20)=71%
           Mar: 20/(50+20)=29%

我在标签日期中做了表达式

=sum(Fields!Deals.Value)/Sum(Fields!Delas.Value, "DataSet1") 但结果是

the bar of Feb: 40/(40+30+50+20)=28%
           Feb: 30/(40+30+50+20)=21%    
the bar of Mar: 50/(40+30+50+20)=35%
           Mar: 20/(40+30+50+20)=14%

谁能帮我获得 57%,43%,71%,29% 谢谢。

【问题讨论】:

    标签: reporting-services charts percentage


    【解决方案1】:

    属性 -> 图表系列标签 -> 格式 -> ##.#0\%

    这将在堆栈图中显示百分比符号。

    【讨论】:

      【解决方案2】:

      您必须使用“月份名称”而不是“dataset1”(这是类别)。这将为您提供预期的输出。

      如果您仍然面临一些问题,请告诉我。

      【讨论】:

      • 是的,你是对的!就我而言,我根本不需要做任何表达。我所做的是 1) 在图表中选择堆积百分比柱形图 2) - 值:sum(Deals) -Category group:Monthname - SeriesGroup:Type。然后 SSRS 将生成百分比为 57%、43%、71%、29% 的条形图。我没有解决的原因是主数据集的 where 子句“ where date >@startdate and date =@startdate 和日期 而不是 >=导致问题。
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2017-09-15
      • 1970-01-01
      • 1970-01-01
      • 2017-08-27
      • 2021-12-01
      • 2021-05-31
      • 2019-06-07
      相关资源
      最近更新 更多