How to use DateDiff between a regular Date field & a Calculated Date field

Hi All, This may have been asked previously, but I have a date column in a dataset called “ActionDateTime”. So each row in the data set has a time when an action happened.
I created a new calculated field using lag function on the “ActionDateTime” field so that for every row I get the “ActionDateTime” of the previous row.
The purpose is so that I can find the time difference between the two actions.

However when I try to use the datediff function it says that I cannot perform the function
giving the error “Mismatched aggregation. Custom aggregations can’t contain both aggregated and nonaggregated fields, in any combination.”

Looking forward to help from this community to find a work around as one of the fields is aggregated and the other is non-aggregated.

Hi @Pjpramod and welcome to the Quick Sight community!
In an instance like this, using Level Aware Cacluations (LAC) to assist.

Could you share a screenshot of the calculated field you’re getting the error on so that we can see where the issue is stemming from?

Hi @Pjpramod,
Following up here as it’s been awhile since we last heard from you; did you have any additional questions regarding your post or were you able to find a work around?

If we do not hear back within the next 3 business days, I’ll close out this topic.

Thank you!

Hi @Pjpramod,
Since we have not heard back, I’ll go ahead and close out this topic. However, if you have any additional questions, feel free to create a new post in the community.

Thank you!