I'm trying to find a way to calculate the months since a certain date. I would like the final formula to look similar to:
Pt:IIF([Avg Order]>=601,5,IIF([Avg Order]>=351,4,IIF([Avg Order]>=201,3,IIF([Avg Order]>=100,2,IIF([Avg Order]>0,1,0)))))
but based on dates.
Date ranges would be something like last 6 months, 7 to 12 months ago, 13 to 24 months ago, 25 to 36 months ago, ect where the most recent data range would be at the beginning.
Is there a function to create the current date so I don't have to type it in every time I run the queries?
Is there a function to see how many months have passed since the date field I'm looking at and comparing to the current date?
Or would you just subtract the 2 date fields and then divide by 30 to have a rough idea of the number of months that have passed?
Pt:IIF([Avg Order]>=601,5,IIF([Avg Order]>=351,4,IIF([Avg Order]>=201,3,IIF([Avg Order]>=100,2,IIF([Avg Order]>0,1,0)))))
but based on dates.
Date ranges would be something like last 6 months, 7 to 12 months ago, 13 to 24 months ago, 25 to 36 months ago, ect where the most recent data range would be at the beginning.
Is there a function to create the current date so I don't have to type it in every time I run the queries?
Is there a function to see how many months have passed since the date field I'm looking at and comparing to the current date?
Or would you just subtract the 2 date fields and then divide by 30 to have a rough idea of the number of months that have passed?