formula to long? (1 Viewer)

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 20:11
Joined
May 7, 2009
Messages
19,227
or:

Quarter: DMin("Quarters","Quarters","[Days] >= " & ([Claim Entered Date] - [Sale Date KY]))
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 08:11
Joined
Feb 19, 2002
Messages
43,196
@araza123,
If you can't build the query, then post a database or spreadsheet with data you want to analyze. We don't need anything except the recordID and some start and end dates.
 

araza123

New member
Local time
Today, 07:11
Joined
Apr 6, 2022
Messages
24
You can also try:
SQL:
SELECT
  c.[Claim Entered Date],
  c.[Sale Date KY],
  (
    SELECT TOP 1
      q.Quarters
    FROM Quarters q
    WHERE q.Days > ([c.Claim Entered Date] - c.[Sale Date KY])
  ) AS Quarter
FROM GAP_Claims_new c
;

If your Quarters Table had a FromDays and a ToDays, you could use a join rather than the subquery field.
think i was very much overthinking this, i think taking the date diference and simply divding it up 90 should work but i would need to round up.

What would be the best approach to have this all in one field. Right now I have my date difference calc as Date_Difference: GAP_Claims_new.[Claim Entered Date]-[Sale Date KY].

if i wanted to add the then divide by 90 and round up, how would i do that

something like Date_Difference: GAP_Claims_new.[Claim Entered Date]-[Sale Date KY]/(90) with it rounding up
 

cheekybuddha

AWF VIP
Local time
Today, 13:11
Joined
Jul 21, 2014
Messages
2,267
How about:
Code:
Date_Difference: "Q" & (Int((GAP_Claims_new.[Claim Entered Date]-[Sale Date KY])/90)) + 1)
 

araza123

New member
Local time
Today, 07:11
Joined
Apr 6, 2022
Messages
24
Thank you to everyone who assisted here. Really appreciate everyone trying to help out. I believe I have the solution!
 

Users who are viewing this thread

Top Bottom