Skip to Content
avatar image
Former Member

Different Results of SUM

How to get the sum of a column with specific filter to show it separately from the block?

Example: The sum of resolution time for the records of type incident is showing 4000 minutes while if I just put it in a separate table block it shows different results.

Please check both attachment for more details.

sum-issue-20170412-001.png

sum-issue-20170412-002.png

Here is the exact code I'm using on both attachments:

=Sum([vTime to Resolve])

And here is the definition of [vTime to Resolve]:

=(DaysBetween( [Open Time] ; [vResolved Time] ))+ ( ( ( ( ToNumber( FormatDate( [vResolved Time] ; "HH" ) ) * 3600 + ToNumber(Left(FormatDate( [vResolved Time] ;"mm:ss");2)) * 60 + ToNumber(FormatDate( [vResolved Time] ;"ss")) ) - ( ToNumber(FormatDate( [Open Time] ;"HH")) * 3600 + ToNumber(Left(FormatDate( [Open Time] ;"mm:ss");2)) * 60 + ToNumber(FormatDate([Open Time] ;"ss")) ) )/60 )/60 )/24

And finally the definition of [vResolved Time]:

=If(IsNull([Actual Resolved Date]);[Update Time];[Actual Resolved Date])

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Apr 12, 2017 at 01:50 PM

    you need to add "SD12345" values object in the variable with Foreach context.similar to in all calculation.

    =(DaysBetween( [Open Time] ; [vResolved Time] )) foreach ([SD12345 values object])

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 13, 2017 at 11:16 AM

    Is this how you are recommending? It's giving me the same outcome:

    =(
    	DaysBetween(
    	[QF GMTTR].[Open Time] ; 
    	[vResolved Time - QF] 
    	) ForEach([QF GMTTR].[Interaction ID])
    ) +
    (
    	(
    	(
    	ToNumber(
    	FormatDate(
    	[vResolved Time - QF] ;
    	"HH"
    	) ForEach([QF GMTTR].[Interaction ID])
    	) * 3600 + 
    	ToNumber(
    	Left(
    	FormatDate( 
    	[vResolved Time - QF] ;
    	"mm:ss"
    	) ForEach([QF GMTTR].[Interaction ID]);
    	2
    	)
    	) * 60 + 
    	ToNumber(
    	FormatDate( 
    	[vResolved Time - QF] ;
    	"ss"
    	) ForEach([QF GMTTR].[Interaction ID])
    	) -
    	(
    	ToNumber(
    	FormatDate(
    	[QF GMTTR].[Open Time] ;
    	"HH"
    	) ForEach([QF GMTTR].[Interaction ID])
    	) * 3600 + 
    	ToNumber(
    	Left(
    	FormatDate(
    	[QF GMTTR].[Open Time] ;
    	"mm:ss"
    	) ForEach([QF GMTTR].[Interaction ID]);
    	2
    	)
    	) * 60 + 
    	ToNumber(
    	FormatDate( 
    	[QF GMTTR].[Open Time] ;
    	"ss"
    	) ForEach([QF GMTTR].[Interaction ID])
    	)
    	)
    	)/60
    	)/60
    )/24
    
    Add comment
    10|10000 characters needed characters exceeded