如何从这两个时间值计算百分比值

时间:2016-07-06 08:50:27

标签: reporting-services ssrs-2008

我有两个表达式正在计算多个数据集

表达式1如下:

=格式((count(Fields!Second_Choice_Options.Value,“授权”)* 20 + count(Fields!Second_Choice_Options.Value,“ClaimPaid”)* 20 + count(Fields!Second_Choice_Options.Value,“ClaimPended”)* 20 + count(Fields!Second_Choice_Options.Value,“General”)* 8 + count(Fields!Second_Choice_Options.Value,“Reassessment”)* 20 + count(Fields!Second_Choice_Options.Value,“ReserveReview”)* 3 + count(Fields) !Second_Choice_Options.Value,“Trigger”)* 5 + Sum(Fields!ACD_Calls.Value,“DataSet3”)* 6 + Sum(Fields!Extn_Out_Calls.Value,“DataSet3”)* 2)/ 60,“00”)& ; “:”&格式(DateAdd(“s”,(count(Fields!Second_Choice_Options.Value,“Authorization”)* 20 + count(Fields!Second_Choice_Options.Value,“ClaimPaid”)* 20 + count(Fields!Second_Choice_Options.Value,“ClaimPended”) )* 20 + count(Fields!Second_Choice_Options.Value,“General”)* 8 + count(Fields!Second_Choice_Options.Value,“Reassessment”)* 20 + count(Fields!Second_Choice_Options.Value,“ReserveReview”)* 3 + count (Fields!Second_Choice_Options.Value,“Trigger”)* 5 + Sum(Fields!ACD_Calls.Value,“DataSet3”)* 6 + Sum(Fields!Extn_Out_Calls.Value,“DataSet3”)* 2)* 60,“00: 00“),”mm:ss“)

,时间价值为71:45:00

然后我有第二个表达式

= System.Math.Floor(Sum(Fields!Staffed_Time.Value)/ 3600) - System.Math.Floor(Sum(Fields!Time_in_Lunch.Value)/ 3600) - System.Math.Floor(Sum(Fields!) Time_in_AUX_1099.Value)/ 3600)& “:”& Microsoft.VisualBasic.Strings.Format(Microsoft.VisualBasic.DateAndTime.DateAdd(“s”,Sum(Fields!Staffed_Time.Value),“00:00”),“mm:ss”)

且时间值为156:39:22

因此我需要在文本框中进行新的计算,并以71:45:00的比例占据156:39:22的百分比,然后以百分比显示 - 这将是45.5%

我该怎么做?

由于 丹

1 个答案:

答案 0 :(得分:0)

不要使用返回格式化时间的两个表达式(即:70:17:00),而是返回分钟数的表达式(即:4217),这样就可以使用TextBoxFormat属性设置为p2的公式:

=[YourExpression1ToObtainMinutes]/[YourExpression2ToObtainMinutes]