Focal Point
[SOLVED]Need to group by specific values

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

January 13, 2016, 10:16 AM
MelissaReed
[SOLVED]Need to group by specific values
I have a report that calculates the number of days a ticket has been opened. I need to group by over 60 days, over 45 days, over 21 etc. How can I set that up in Info Assist?

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


WebFOCUS 8.0.09
Windows, All Outputs
January 13, 2016, 11:34 AM
BabakNYC
You have to use a DEFINE under DATA tab to create buckets for each of these values. If the OPEN_DATE is an HYYMD format field, define today's date, difference between today and OPEN_DATE and then use an IF THEN ELSE to bucket the values you get in it. You should then be able to sort BY or ACROSS BUCKET.

Here's something you could use to start your code.

TDAY/HYYMD WITH OPEN_DATE = DT( &YYMD );
DIFF_DAYS/I5 = HDIFF(TDAY, OPEN_DATE, 'DAY', 'I5');
BUCKET/A20= IF DIFF_DAYS GT 21 THEN ......ELSE....


WebFOCUS 8206, Unix, Windows
January 20, 2016, 10:06 AM
MelissaReed
Thank you, that worked.


WebFOCUS 8.0.09
Windows, All Outputs