SSRS指标影响群体

时间:2012-07-19 19:53:00

标签: reporting-services indicator

我正在过滤Tablix,然后将两行(总共3行)和列(总共2行)分组,没有详细信息部分。一行仅对其中一个分组列具有适用值。该组将所有值放在正确的单元格中。但是,如果我添加一个指标,那么该列没有适用值的行将继承另一行的数据。添加指标所基于的字段不会进行此更改。此行(以及其他正常工作的行)对于第一列中的指示符具有空值,IE不应该显示。

数据集:

+---------+---------------+-----------+---------+
| Family  |  Description  |  Value    |Indicator|
+---------+---------------+-----------+---------+
|  A      |  Something    |   5       |    2    |
|  A      |  Another      |   2       |    1    |  
|  B      |  Yearly Plans |   63      |   null  | 
|  B      |  Weekly Plans |   4       |    2    | 
|  B      |  Yearly Qual  |   .4      |    1    | 
|  B      |  Weekly Qual  |   .2      |    1    | 
|  B      |  Purchased %  |   .76     |   null  | 
+---------+---------------+-----------+---------+
  • 过滤器Tablix for Family = B
  • 行组:= iif(字段!说明。值类似“计划”,“计划”,iif(字段!说明。值类似“ Qual ”,“排位”,字段!Description.Value))
  • 列组:iif(Field!Description.Value like“Yearly *”,“YTD”,“Weekly”)

没有指标的结果:

+---------------+------------+----------+
| Description   |  Weekly    |  YTD     |
+---------------+------------+----------+
|  Qualifying   |   .2       |   .4     | 
|  Plans        |    4       |   63     | 
|  Purchased %  |   .76      |          | 
+---------------+------------+----------+   

带指标的结果(基于指标字段):

+---------------+--------+---+--------+---+
| Description   | Weekly |   |  YTD   |   |
+---------------+--------+---+--------+---+
|  Qualifying   |   .2   | - |   .4   | - | 
|  Plans        |    4   | + |   63   |   | 
|  Purchased %  |   .76  |   |   .4   | - | 
+---------------+------------+--------+---+

它应该是什么:

+---------------+--------+---+--------+---+
| Description   | Weekly |   |  YTD   |   |
+---------------+--------+---+--------+---+
|  Qualifying   |   .2   | - |   .4   | - | 
|  Plans        |    4   | + |   63   |   | 
|  Purchased %  |   .76  |   |        |   | 
+---------------+------------+--------+---+

我通过在年度购买的%行中使用空值进行联合来修补当前问题,但必须有其他内容。指标的行为是否会增加不属于某个群体的价值?

1 个答案:

答案 0 :(得分:2)

我意识到同样的事情,可能是SSRS指标中的一个错误,作为解决方法,您可以在单元格内写一个表达式来检查另一个单元格并调查是否有数据然后显示单元格内的值,如果不是什么都不写。

喜欢:=iif(count(Fields!Field1.Value)>1,"",Fields!Field2.Value)