Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Time difference between 'OFF' and the immediate next 'ON'.

ccdyat
7 - Meteor

Hi Friends,

 

I have attached the sample data along with this. I need help to find the Time difference between 'OFF' and the immediate next 'ON'. 

 

It will be more helpful,if the solution is with In-DB Tools.

 

 

ccdyat_0-1585916196587.png

Thanks & Regards,

Sreekanth

 

11 REPLIES 11
mceleavey
17 - Castor
17 - Castor

Hi @ccdyat ,

 

Use a multi-row formula tool and use the following formula:

 

if [Row-1:Status]="OFF" and [Status]="ON" then DateTimeDiff([Time],[Row-1:Time], "minutes") else 0 endif

 

 



Bulien

RolandSchubert
16 - Nebula
16 - Nebula

Hi @ccdyat ,

 

it should be possible using the Multi-Row Formula tool (sample attached), but it's not In-DB ... hope, it's helpful.

 

Best,

 

Roland

OllieClarke
15 - Aurora
15 - Aurora

Hi @ccdyat here's a way to do it that will work in-db

I should say that it's less efficient than the multi-row method, but I've only used tools that have an in-db equivalent.

OllieClarke_0-1585920308658.png

OllieClarke_1-1585920341851.png

 

Hope that helps,

 

Ollie

 

ccdyat
7 - Meteor

Hi @OllieClarke,

 

Can you please help me to do the same with MultiRow Formula as well? 

 

Thanks & Regards,

Sreekanth

 

 

mceleavey
17 - Castor
17 - Castor

Hi @ccdyat ,

 

it would be exactly the same aside from you would use a formula tool, and rather than doing the difference between a field and the same field row-1, you would apply the difference between two columns. 

Post some data and I'll build it for you.

 

M.



Bulien

ccdyat
7 - Meteor

Hi @mceleavey ,

 

Please find the attached data. Below the requirement.

 

ccdyat_0-1585926027482.png

 

Thanks.

mceleavey
17 - Castor
17 - Castor

Oh, sorry. I thought you meant you had a different data set that was laid out differently.

With that data set you would not use multi-field formula.

 

M.



Bulien

OllieClarke
15 - Aurora
15 - Aurora

Hi @ccdyat there is no in-db multi-row formula i'm afraid (which is why I had to join and summarise instead)

ponraj
13 - Pulsar

Sample workflow 

 

Capture.PNG

Labels