0

How to make the calculation below work.

{ FIXED [Call_Count]:IF ATTR([Date]) >= MIN([Date]) AND ATTR([Date]) <= MAX([Date])THEN COUNTD([Date]) END }

I just need to get the number of days starting the first occurrence date to the Latest date available or now().

COCO
  • 15
  • 1
  • 7

1 Answers1

0

I think we need clarification on what Call_Count is, and the table layout, but here's a stab at it:

COUNTD(
 IF (
  [Date] >= { FIXED [Call_Count] : MIN([Date]) }
  AND [Date] <= { FIXED [Call_Count] : MAX([Date]) }
 ) THEN [Date]
 END
)

This will check if the current row's date is >= the min date of the call_count and the current row's date is <= the max date of the call count.

However, I think that this would always be true? The date would have to be between the min and max?

Maybe you're looking for something like this?

DATEDIFF("day", { FIXED [Call_Count] : MIN([Date]) }, { FIXED [Call_Count] : MAX([Date]) })

This would get you the days between the minimum and maximum for each call_count.

  • This is correct! Thank you! Though I need to know now how do we exclude Sundays from this and if possible public holidays. Though I kinda need to prioritize the exclusion of sunday. – COCO Aug 02 '21 at 00:53
  • Actually I used this simpler one. DATEDIFF('day', MIN([Date]),MAX([Date])). I am beginner sorry – COCO Aug 02 '21 at 00:54