Focal Point
[CLOSED] Computing Month/Quarter/Yearly Date Boundaries

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/3207014196

July 08, 2019, 02:08 PM
mbondr
[CLOSED] Computing Month/Quarter/Yearly Date Boundaries
ACROSS is great, but in order to use it you have to limit the boundaries on the data from your masterfile as well. I have a start and end date ('MYY') for the report, but if someone puts in 7/2018 and then requests a quarterly across report, then they're going to get a quarter with only a month's worth of data aggregated.

For my WHERE, I need to convert that 7/2018 to 4/2018. I tried HDATE(HDATE(START, 'QYY'), 'MYY'), but it appears you can't get from QYY to MYY, which is not surprising. But this has to be a problem faced by anyone using ACROSS and I know there's a standard solution to this. Anyone care to share it?

This message has been edited. Last edited by: mbondr,


WebFOCUS 8.2.04 (and climbing)
Windows 10, AppStudio
July 08, 2019, 02:30 PM
BabakNYC
What happens if they enter 6/2018? Will you want it to go back to 3/2018? In other words is the offset months always 3 months or would you prefer to always start with the beginning quarter that month falls into?


WebFOCUS 8206, Unix, Windows
July 08, 2019, 02:35 PM
mbondr
The beginning of the quarter. However, I realize that I've misunderstood the error log and no longer need this. It is an interesting intellectual problem though.


WebFOCUS 8.2.04 (and climbing)
Windows 10, AppStudio
July 08, 2019, 04:05 PM
MartinY
The question that you may also ask yourself is : does the quarters are always Jan-Mar, Apr-Jun, Jul-Sep, Oct-Dec ?

The answer is NO

Depending on the organization Fiscal calendar, the quarter may change.
If the fiscal year starts in Nov and not Jan, then your quarters are : Nov-Jan, Feb-Apr, Mai-Jul, Aug-Oct

So having a "standard solution" this this may not be true.

You should better defined your own quarters based on the organization fiscal calendar. You can then have global variable assigned with proper date range according to the situation.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007