BY OS_USERNAME BY LOGON_DATE BY USERNAME WHERE MASTER_SESSION EQ 1 -* &strSCHEMA.EVAL <- from selection Screen &strMONTH.EVAL &strYEAR.EVAL ON TABLE HOLD AS USR_DATA END
ON GRAPH SET LOOKGRAPH LINE -* -GOTO STYLEFLD; -* -SKIPBY -* SUM MAX.LCOUNTER AS 'Concurrent Users' BY USERNAME AS ' '
-*ACROSS MONTH COLUMNS JAN AND FEB AND MAR AND APR AND MAY AND JUN AND JUL AND AUG AND SEP AND OCT AND NOV AND DEC AND JAN AND FEB AND MAR AND APR AND MAY AND JUN AND JUL AND AUG AND SEP AND OCT AND NOV AND DEC ACROSS LOGIN_YEAR NOPRINT -* ON GRAPH SET LOOKGRAPH LINE END
The issue I'm having is that is the months between 2007 and 2008 are coming in as 1 thru 12 only. So, the display will come out as Jan Feb Feb Mar Mar....if there are no values for the months, it will not display. So really the issue I am having is that 2008 is being read as 1 thru 12 rather then 13 thru 24. How can I fix this?
Thanks in advance.This message has been edited. Last edited by: Kerry,
Production & Development: WebFocus 7.6.4
February 23, 2009, 10:03 AM
j.gross
Since you have 'by year', you apparently want to report the 12 months of 2008, and below that the months of 2009.
Define the year_and_month, and its year and month components, as 'smart dates'. Then you can use numeric values 1 to 12 in the COLUMNS phrase to force all 12 months to display by name, as below.
-* get specimen data from 1/2008 thru 12/2009, -* with some gaps. DEFINE FILE GGSALES START/MYY='DEC 2007'; YYM/YYM=START+SEQ; END TABLE FILE GGSALES SUM UNITS BY SEQ BY YYM IF SEQ FROM 1 TO 24 IF SEQ NE 9 OR 14 OR 21 ON TABLE HOLD END -RUN
-* report by year across month, forcing all 12 months to appear
DEFINE FILE HOLD
YEAR/YY=YYM;
MONTH/MT=YYM;
END
TABLE FILE HOLD
SUM UNITS
BY YEAR
ACROSS MONTH COLUMNS 1 AND 2 AND 3 AND 4 AND 5 AND 6 AND 7 AND 8 AND 9 AND 10 AND 11 AND 12
END
February 23, 2009, 10:16 AM
Mayor
Just to note, I meant to have login_year in an across and not a by, I apologize for that. Just to be clear, I want to display 24 months on a graph.
Production & Development: WebFocus 7.6.4
February 23, 2009, 10:37 AM
j.gross
OK, but now what's your problem?
getting a single "across" variable for year & month? Handling missing months?
February 23, 2009, 02:43 PM
Mayor
I was able to use your structure and logic to situate myself. what I did was,
SUM DST_OS_USERNAME AS 'Unique Users' BY USERNAME AS 'User Names' ACROSS MONTHS COLUMNS 'JAN 07' AND 'FEB 07' AND 'MAR 07' AND 'APR 07' AND 'MAY 07' AND 'JUN 07' AND 'JUL 07' AND 'AUG 07' AND 'SEP 07' AND 'OCT 07' AND 'NOV 07' AND 'DEC 07' AND 'JAN 08' AND 'FEB 08' AND 'MAR 08' AND 'APR 08' AND 'MAY 08' AND 'JUN 08' AND 'JUL 08' AND 'AUG 08' AND 'SEP 08' AND 'OCT 08' AND 'NOV 08' AND 'DEC 08' -*ACROSS LOGIN_YEAR NOPRINT ON GRAPH SET LOOKGRAPH LINE END
Appreciate your help J.Gross, Thanks!
Production & Development: WebFocus 7.6.4
May 31, 2016, 10:43 AM
Mike in DeLand
quote:
Originally posted by j.gross: Since you have 'by year', you apparently want to report the 12 months of 2008, and below that the months of 2009.
Define the year_and_month, and its year and month components, as 'smart dates'. Then you can use numeric values 1 to 12 in the COLUMNS phrase to force all 12 months to display by name, as below.
-* get specimen data from 1/2008 thru 12/2009, -* with some gaps. DEFINE FILE GGSALES START/MYY='DEC 2007'; YYM/YYM=START+SEQ; END TABLE FILE GGSALES SUM UNITS BY SEQ BY YYM IF SEQ FROM 1 TO 24 IF SEQ NE 9 OR 14 OR 21 ON TABLE HOLD END -RUN
-* report by year across month, forcing all 12 months to appear
DEFINE FILE HOLD
YEAR/YY=YYM;
MONTH/MT=YYM;
END
TABLE FILE HOLD
SUM UNITS
BY YEAR
ACROSS MONTH COLUMNS 1 AND 2 AND 3 AND 4 AND 5 AND 6 AND 7 AND 8 AND 9 AND 10 AND 11 AND 12
END
OMG this is wonderful! A one-line fix to something I've been fighting all morning. I must admit I'm not quite sure how exactly it works, but I'll take it! Thanks!