2016-07-06 85 views
0

我有两个表达式,其跨多个数据集如何从这两个时间计算百分比值中,

式(1)如下的计算:

=格式((计数(场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 (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, “重新评估”)* 20+计数(Fields!Second_Choice_Options.Value,“ReserveReview”)* 3+ count(Fields!Second_Choice_Options.Value,“Trigger”)* 5 + Sum(Fields!ACD_Calls.Value,“DataSet3”)* 6 +萨姆(!字段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%

我该怎么做?

感谢 丹

回答

0

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

=[YourExpression1ToObtainMinutes]/[YourExpression2ToObtainMinutes] 
+0

感谢您的回复Tezzo - 我编辑的格式属性P2在文本框中,但是当我把两人的表情则显示为错误 Dan –

+0

也许我没有解释得很好(抱歉我的英文不好):你不必分割返回格式化日期时间的表达式,而是返回分钟数的表达式。不是返回70:17:00的表达式,而是返回4217的表达式)。 – tezzo

+0

是的,现在更有意义,非常感谢。考虑回答这个问题 –