Adobe Customer Journey Analytics Finding difference between two metrics | Community
Skip to main content
Level 2
February 21, 2025
Solved

Adobe Customer Journey Analytics Finding difference between two metrics

  • February 21, 2025
  • 2 replies
  • 840 views

Hi,

 

Consider a scenario where I want to get the occurrence count for events occurring between the difference of two metrics of the type datetime.

 

E.g. ingested records in aep contains two fields 'timestamp' and 'purchaseTimestamp'. I want to find the count of records for which the difference in 'timestamp' and 'purchaseTimestamp' lies between the category of '0-5 Min', '5-10Min', '10-15 min'.

 

Any suggestions, help is much appreciated

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Josh Stephens

I don't believe there's currently a way to do to this in CJA.  The derived field functions that work with datetime fields are limited.  As @manojsingh-tech mentioned, Query Service may be the best approach for now.

Alternatively, you could perform a full table export with both timestamps, but it'd probably be easier to use query service.

2 replies

manojsingh-tech
Level 2
February 21, 2025

You can achieve this using Adobe Experience Platform Query Service (SQL) by categorizing records based on the time difference between timestamp and purchaseTimestamp

AGoodDocAuthor
Level 2
February 21, 2025

Can it be achieved on CJA?

manojsingh-tech
Level 2
February 21, 2025

Create a calculated metric with below function

DATEDIFF("minute", purchaseTimestamp, timestamp)

This function calculates the difference between timestamp and purchaseTimestamp in minutes.

Josh Stephens
Community Advisor
Josh StephensCommunity AdvisorAccepted solution
Community Advisor
February 24, 2025

I don't believe there's currently a way to do to this in CJA.  The derived field functions that work with datetime fields are limited.  As @manojsingh-tech mentioned, Query Service may be the best approach for now.

Alternatively, you could perform a full table export with both timestamps, but it'd probably be easier to use query service.