Focal Point
Setting PMF back a year in time on the fly

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

April 02, 2012, 10:51 AM
Moogle
Setting PMF back a year in time on the fly
Hi Team,

I'm building a report that mixes YTD and QTD time ranges over three years; Current, Prior (1 year ago), Prior Prior (2 years ago)

PMF ships with YTD and QTD time ranges, and I added YTD Prior and QTD Prior time ranges. I could not figure out how to add a YTD Prior Prior or QTD Prior Prior time range, so I tried to get fancy. I figured that I could set PMF's frozen in time variable(s) back a year, and then re-use my YTD_PRI and QTD_PRI time ranges.

This actually worked for the Year to Date Prior time range, but not for the Quarter to Date time range. When pulling numbers for Quarter to Date Prior, it shows the same results when I use the default frozen in time period versus when I set it back a year.

I think I must not be resetting the frozen in time period properly for Quarter to Date time periods, which is entirely possible, as I invented this technique out of the air. This is what I'm doing:

  
-TYPE &TLVL01_CUR
-* here is where the magic happens:
-SET &TLVL01_CUR=&TLVL01_CUR-1;
-TYPE &TLVL01_CUR

-TYPE &TLVL0102_CUR
-SET &TLVL0102_CUR=&TLVL01_CUR||&TLVL02_CUR;
-TYPE &TLVL0102_CUR

-TYPE &TLVL0103_CUR
-SET &TLVL0103_CUR=&TLVL01_CUR||&TLVL03_CUR;
-TYPE &TLVL0103_CUR

-TYPE &TIME_HASH_CURRENT
-SET &TIME_HASH_CURRENT=&TLVL01_CUR||'/'||&TLVL02_CUR||'/'||&TLVL03_CUR;
-TYPE &TIME_HASH_CURRENT


A solution to any of the following would solve my problem:

-is it possible to build a QTD Prior Prior time range?
-did I miss something with the above time variable mishmash?
-is there a totally easy and probably-already-well-documented method to reset the time period with a SET command?

Cheers,

Joey


-WebFOCUS 8.2.01 on Windows
April 03, 2012, 01:23 PM
Moogle
Hi Team,

With the expert guidance of Rob North, I've been able to create YTD - Prior Prior and QTD - Prior Prior Time Ranges.

Thus, there is no longer any time pressure for a solution to this for me. I know everyone is furiously working on the next PMF, so please respond to this topic at a later date.

Cheers,

Joey
April 07, 2012, 09:43 AM
gregv
Hi Joey,
If you can share the parameters/criteria you use to create this new Time Range, it could be useful to others creating new Time Ranges.
Thanks.



Greg



current client: WF 8.1.05 & 8.2 - Windows 7 64bit - Tomcat 7 - MRE / BID - IE11

local: WF 8.2 - Windows 7 64bit - Tomcat 6 - MRE / BID - FOCUS - IE11

PMF 8