As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.
Join the TIBCO Community TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.
From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
Request access to the private WebFOCUS User Group (login required) to network with fellow members.
Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.
I have a report that is laid out with Sales Rep, Division, Store, and then an across of Dept (which has 4 unique depts). for each store I have 2 unique rows, 'CP' and 'YTD'. I need a territory summary after each Sales rep, that will total for 'CP' and 'YTD' for each of the 4 depts. I can't figure it out. And BI support has yet to get back to me. Any geniuses out there that could help me?
You'll have to give a bit more info than that. Are the rows for CP and YTD done with an OVER or are they values that you can report from? I tried playing with the GGSALES table and found that I hit a roadblock when trying to come up with something.
If it's an OVER, then subtotal may do what you want.
Ken
Prod - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE Dev - WF 7.6.4 Unix/Solaris - Self-Service, BI Dashboard, MRE Databases: Oracle 10g, SQL Server 2000, DB2.
Ken has hit upon a solution for you and that is to use OVER on CP and YTD instead of sorting by them (if that is what you are doing?).
For an example we first have to get some data to mimic what I think yours might look like, and to do that I will use the McGyver method and then join to GGSALES as it has similar data to what you describe -
APP FI MCGYVER DISK MCGYVER.MAS (LRECL 80
-RUN
-WRITE MCGYVER
-WRITE MCGYVER FILE=MCGYVER,SUFFIX=FOC
-WRITE MCGYVER SEGNAME=SEG1
-WRITE MCGYVER FIELD=MCGYVER_KEY, ,A1 ,A1 ,FIELDTYPE=I, $
-WRITE MCGYVER FIELD=SUM_TYPE, ,A3 ,A3 ,$
-RUN
CREATE FILE MCGYVER
MODIFY FILE MCGYVER
FIXFORM MCGYVER_KEY/A1 SUM_TYPE/A3
DATA
CP
YTD
END
-RUN
JOIN MCGYVER_KEY WITH REGION IN GGSALES TO MULTIPLE MCGYVER_KEY IN MCGYVER AS J1
DEFINE FILE GGSALES
MCGYVER_KEY/A1 WITH REGION = ' ';
CUR_PERIOD/M = DATE;
-* Here I am trying to mimic two columns of data as per your post
CP/D20.2c = IF SUM_TYPE EQ 'CP ' AND CUR_PERIOD EQ 4 THEN DOLLARS ELSE 0;
YTD/D20.2c = IF SUM_TYPE EQ 'YTD' AND CUR_PERIOD LE 4 THEN DOLLARS ELSE 0;
END
TABLE FILE GGSALES
SUM CP
OVER YTD
BY PRODUCT PAGE-BREAK
BY CITY
BY STCD
ACROSS REGION ROW-TOTAL AS 'All Regions'
WHERE DATE FROM '19960101' TO '19961231'
ON PRODUCT SUBTOTAL AS 'Total for '
END
-RUN
Good luck
T
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004
Thanks for you input! I am not using an over. I have 2 separate records in a file I created. One for 'CP' and one for 'YTD'. I am usinga match to put the two records in the same file. I could change it and use the over and see if that works. Great ideas!
Thanks Francis, but I already have a few hundred of those tools and they really do have thousands of uses my favorite is replacing Grannies crochet hook when she's put it down and can't remember where she left it - rofl
In FOCUS since 1986
WebFOCUS Server 8.2.01M, thru 8.2.07 on Windows Svr 2008 R2
WebFOCUS App Studio 8.2.06 standalone on Windows 10
Posts: 5694 | Location: United Kingdom | Registered: April 08, 2004