I am having a brain blip…I am attempting to filter a table based on a date for the last 4 quarters (inclusive of current quarter). I am seeing that you can filter for quarters for “during the current”…however everything else is by months.
Any guidance on how to filter for the most recent 4 quarters (inclusive of the current quarter) would be appreciated. @moe ???
isnt last 4 qtrs same thing as last 12 months. Will this work? the screenshot has 12 months but if you include AND current qtr then perhaps change the 12months to 9 months to avoid risk of spanning across to 5 qtrs.
The last 12 months isn’t the same as the last 4 quarters since 4 quarters depending on the date when the counting starts.
For example, if you started counting 1 Jan of this year (which is the first quarter in the count then the 4 quarters would stop at April of the previous year (quarter 2)…not Jan of the previous year since that would be 5 quarters.
Thanks @Shumon, I will play with this but I don’t think this will work at first glance. Maybe it is a roadmap to a solution for my application. I very much appreciate your comments.
If not solved yet then try this: Create your own calender table and add fields as shown below. The 4th field (FK_PRID) is a period ID and is a running increment of qtr. This field can be used to return the date range current qtr plus last 3 qtrs. For example 1st qtr of 2023 plus last 3qtrs would be current PRID - 3 (5-3)
Just my brain fart:
What if you take 2 fields. 1 with current quarter and then one with the previous 3 quarters. And then add these answers in an equation. Is that not what you are looking for?
Hmm…tricky… ideally it looks like “quarters” should really be added to the filter, since, as you say, Quarters are available “during the current” term just not available in the “next” or “previous”
I guess you could write your own Pipe. I was going to suggest you use the Date Pipes that are already available but annoyingly I think you’d need the ability to Subtract months (9) and then call the “Get Beginning of Quarter” API call but very frustratingly the “Subtract month” API call also isn’t currently available!
Worst case a small lookup table as previously advised might be the only route.
Further to this, I just had a little play and wrote this Pipe that Subtracts 9 months so I think if you were to update this to either include the rest of the calculation or use the existing pipe to set this date to “Set Beginning of Quarter” you could achieve your result.
Graham, the honourable gentlemen who raised this issue is yet sort out his table relationship so perhaps this challenge can be revisited once we know the db normalisation rules have been followed.