3 Replies Latest reply on Jan 31, 2018 5:02 PM by sunil.sachdeva

# Calculation issue

Hi All

Have a problem guys, I have done a calculation based on moving a car by a reg and what the calculation does is

e.g

car a moved at 9:00am to 10:00am

car a moved again at 14:00:15:00

instead of looking at each movent

for example both movements were 1 hour each

it calculates by looking at the last given movemnt so 15:00 - 9:00 which makes it 6 houus, this is distroting my data. Not sure waht do to? I have attached the workbook

thanks

Formula :

IF [Time] = {FIXED [First Name],[Last Name], DATE([Time]),[Regn] : MAX([Time])} AND {FIXED [First Name],[Last Name] , DATE([Time]) , [Regn] : COUNTD([Time])} > 1 THEN

{FIXED [First Name],[Last Name], DATE([Time]), [Regn] : MAX([Time]) - MIN([Time])}

ELSE NULL

END

• ###### 1. Re: Calculation issue

Hi Yusuf

Find my approach based on LOD as reference below and stored in attached workbook version 10.3 located in the original thread.

1. D1. max time: {fixed [Driver],[Regn]:max([Time])}

2  D2. min time: {fixed [Driver],[Regn]:min([Time])}

3. M1. Duration: datediff('minute',[D1. min time ],[D1. max time])

Regards,

Norbert

• ###### 2. Re: Calculation issue

Hi Norbert

Thanks for fantastic reply!..Only small problem, I need it in the same format rankikng by the time from earlist to latest same as on below... but it should caluclate as below. Do ou an alternate solution?

• ###### 3. Re: Calculation issue

Hi,

something like this?

I tried to do it using table calculations (not using LODs)

Please find attached sample workbook, hope that helps.