Hi everyone,
Is there a way to create a calculated field the compares two values between to columns that are not in the same row and if it finds a duplicate, it measures the time difference between the corresponding rows in another column?
In this screenshot the value in B21 and A25 are the from the same machine (OGI15) and I need to calculate the time difference between D21 & D25. I need a calculated fields that does it. If it finds the same value in Column B and A while it is the same machine (column C) it gives me the time difference.
Unfortunately I was unable to create such a calculated field.
Thanks,
Etai
Hi @Etai ,
I am unsure of your use case, so suggesting some generic steps which I think may help.
Step 1: create a common field to fetch single ID from column A and B, can use function such as coalesce, or if else if you have complex logic for cases where both A and B have values.
Step 2: Fetch next row timestamp using lead() based on the partition- new created column and column C and calculate time difference.
Please tweak as per your use case and logic.
Thanks,
Prantika
1 Like
Thank You very much!
1 Like