如何在我的报告中获得针对已输入呼叫的总正确结果?

时间:2019-07-01 07:39:54

标签: reporting-services report

我有输入电话的报告。我想获取列%Weekdays的总和。 例如,我将向您展示我的价值观和预期结果: 预期的结果是100,7% enter image description here

https://imgur.com/blCWR5A

这是我的%weekdays(平均值)代码,但我希望所有行的总值:

 =avg(IIF(Weekday(Fields!DATE_YYYYMMDD.Value,2)<6,CDBL(Fields!N_ENTERED.Value),Nothing))/
iif(Sum(IIF(Weekday(Fields!DATE_YYYYMMDD.Value,2)<6, CDBL(Fields!N_ENTERED.Value), Nothing),"PRESENTATION_NAME")=0,1   
    (Sum(IIF(Weekday(Fields!DATE_YYYYMMDD.Value,2)<6, CDBL(Fields!N_ENTERED.Value), Nothing),"PRESENTATION_NAME")/
iif(code.getWeekDaysCount(Parameters!From_date.Value,Parameters!To_date.Value)=0,1,code.getWeekDaysCount(Parameters!From_date.Value, Parameters!To_date.Value))))

2 个答案:

答案 0 :(得分:0)

如果您只想汇总“%工作日”列,并假设其为myWeekdaysCol,则可以这样做

=SUM(ReportItems!myWeekdaysCol.Value)

这将简单地将最终结果求和,而不必创建一个难以理解的长表达式。

答案 1 :(得分:0)

这是我简化您的数据并生成总和的

%工作日只是=Fields!Weekday.Value/10.40

然后我刚刚在Group-below下创建了%dayday的总和

enter image description here

enter image description here

并简单地生成总和

=Sum(Fields!Weekday.Value/10.40)

在我简化的情况下,我生成&weekday除以10.40,这就是我的公式。 您将必须执行以下操作

=Sum(avg(IIF(Weekday(Fields!DATE_YYYYMMDD.Value,2)<6,CDBL(Fields!N_ENTERED.Value),Nothing))/
iif(Sum(IIF(Weekday(Fields!DATE_YYYYMMDD.Value,2)<6, CDBL(Fields!N_ENTERED.Value), Nothing),"PRESENTATION_NAME")=0,1   
    (Sum(IIF(Weekday(Fields!DATE_YYYYMMDD.Value,2)<6, CDBL(Fields!N_ENTERED.Value), Nothing),"PRESENTATION_NAME")/
iif(code.getWeekDaysCount(Parameters!From_date.Value,Parameters!To_date.Value)=0,1,code.getWeekDaysCount(Parameters!From_date.Value, Parameters!To_date.Value)))))