Hi Celopeers, This question is for 2 reasons. 1.how to filter out few activities from my activity table & get the Activity_lag value properly even after filtering the activities 2) A scenario based question about DateDiff function Hi Celopeers,In My Activity table , 1 case has 10 Activities. I am creating a report in which I need only 6 out of this 10 Activities. So, I introduced a Compound Filter and restricted the not-required 4 activities. Now, I was asked to find out the time taken between activities. I used the PQL query 'DATEDIFF (hh, ACTIVITY_LAG ( "_CEL_CS_ACTIVITIES"."EVENTTIME", 1),"_CEL_CS_ACTIVITIES"."EVENTTIME" ) - It has two issues. Due to Compound filter, the 4 activities are not showing up (which is the requirement), but the above PQL calculates the DateDiff for the 10 all Activities. So,When the 6 Activities showing up in the report, the DateDiff does not makes sense, that's because datediff is calcalated for all the 10 activity at the background. Any thoughts on how can I fix it? 2.Activity A happens at Jan 10th 8 O'clock.Activity B happens at Jan 11th 10 O'clock.DateDiff of Hour function gives only the value as 2. But logically it should