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 am wanting to get the total by 2 othe fields. I am not able to to do or should I say figure it out.
PRINT MBR_NAME MBR_NBR_TXT AS 'Customer,No.' MBR_STAT_DESC AS 'Customer,Status' POL_NBR_TXT AS 'Policies' POL_TYPE_TXT AS 'Policy,Line of,Business' POL_STAT_DESC AS 'Policy,Status' Gained Lost BY DIST_CD AS 'Dist' BY AGCY_CD AS 'Agency' BY AGT_CD_TXT AS 'Wrt Agt,as of,Jan 1' BY Gained NOPRINT BY Lost NOPRINT
ON AGT_CD_TXT RECOMPUTE SUM. Gained SUM. Lost AS '*TOTAL' ON TABLE SUBHEAD
Results... Dist Agency WrtAgtJan 1 CustName CustNo. Customer Status Policies PolicyLinofBus PolicySta Gained Lost 1 9 14789 KODY KITCHENS B6NF PAID 21511154 SM INACTIVE 0 -1 LUIS CARLOS SAENZ VD6W BILLED 278593 HO INACTIVE 0 -1 LUIS CARLOS SAENZ VD6W BILLED 418254 HO INACTIVE 0 -1
*TOTAL 14789 0 -3
But the result should only be counting by Agent and by Member No. not by policy. The *Total should be 0 and -2. Can someone out there PLEASE help me??
Latigresa learn to use the [ code ] tags, so we can read your stuff, sans ageda. Member No isn't a BY field in your report, Policy seems to be. Gained and Lost are referenced twice in your extract, making it unclear which is being pulled in your recompute. Replicate your report on the CAR file, so we can replicate and correct it for you.
In Focus since 1979///7706m/5 ;wintel 2008/64;OAM security; Oracle db, ///MRE/BID
Posts: 3811 | Location: Manhattan | Registered: October 28, 2003
OK..I redid this whole thing to where it WAS READABLE but when I clicked ok it changed it all...I AM NEW TO ALL THIS AND THAT IS WHY I AM ON HERE ASKING FOR HELP! THANK YOU!!
When posting insert your code between the 'code' tags Also, are you wanting subtotals. There is subtotal and sub-total. One will give sub-totals on all 'by's' after the value. Try a summarize or recompute on each by field you want.
Leah
Posts: 1317 | Location: Council Bluffs, IA | Registered: May 24, 2004
What if the results is by 2 field together instead each? I think as usual I have not worded it correctly. The total I am wanting is a combination of by Member Number and by Agent Code for the Gain and Loss fields. If Agent Code 123 has 3 Memeber Number but one or more of those members has several policies I want it to count the Member Number only once. Right now it is counting each policy instead of each member number. Hope you are able to understand what I am trying to do.
JOIN
MKCUSTRPTGL.SEG01.AGCY_CD IN MKCUSTRPTGL TO MULTIPLE MKCUSTCNTGL.SEG01.AGCY_CD
IN MKCUSTCNTGL AS J1
END
DEFINE FILE MKCUSTRPTGL
Gained/I2=IF CUST_CHNG_TXT EQ 'GAIN' THEN 1 ELSE 0;
Lost/I2=IF CUST_CHNG_TXT EQ 'LOSS' THEN -1 ELSE 0;
BEG_DAY/YYMD=DATEMOV(RPT_DT, 'BOM');
END_MONTH/YYMD=DATEMOV( RPT_DT, 'EOM');
CURR_YR/YY=DATEMOV( RPT_DT, 'YY');
CURR_MON/M=DATEMOV(RPT_DT, 'M');
CURR_DATE/TRMDYY=RPT_DT;
CUR_MON_1/TRM=CURR_DATE;
Mon_Day/JUL=RPT_DT;
END
TABLE FILE MKCUSTRPTGL
SUM
MBR_NBR_TXT AS 'Customer,No.'
BY DIST_CD AS 'Dist'
BY AGCY_CD AS 'Agency'
BY AGT_CD_TXT AS 'Wrt Agt,as of,Jan 1'
BY MBR_NAME AS 'Customer,Name'
SUM
AVE.Gained AS 'AVE,Gained'
AVE.Lost AS 'AVE,Lost'
BY DIST_CD AS 'Dist'
BY AGCY_CD AS 'Agency'
BY AGT_CD_TXT AS 'Wrt Agt,as of,Jan 1'
BY MBR_NAME AS 'Customer,Name'
BY MBR_STAT_DESC AS 'Customer,Status'
BY POL_NBR_TXT AS 'Policies'
BY POL_TYPE_TXT AS 'Policy,Line of,Business'
BY POL_STAT_DESC AS 'Policy,Status'
ON AGT_CD_TXT SUBTOTAL
SUM. Gained
SUM. Lost AS '*TOTAL'
ON TABLE SUBHEAD
"<CURR_YR AGENT CUSTOMERS GAINED AND LOST DETAIL"
"DOES NOT INCLUDE NEW CUSTOMERS"
"FOR <CUR_MON_1 "
"Print Date:<+0>&DATEMDYY<+0> "
WHERE CUST_CHNG_TXT NE 'NEW';
WHERE CNT_TYPE_TXT EQ 'AGT';
WHERE RECORDLIMIT EQ 2000
ON TABLE SET PAGE-NUM OFF
ON TABLE SUMMARIZE AS 'TOTAL'
ON TABLE PCHOLD FORMAT HTML
ON TABLE SET HTMLCSS ON
ON TABLE SET STYLE *
Here is the revised code...it gives me the totals for all policies instead of just by Member No per Agent code.
Thank you for helping me..
AnaThis message has been edited. Last edited by: Latigresa,
I have tried to create what I think you want, using the car file. Can you tell me if this is close to your requirements:
DEFINE FILE CAR
CNTR WITH MODEL=1;
CNTR2 WITH CAR=1;
END
TABLE FILE CAR
SUM CNTR2 NOPRINT
BY COUNTRY
SUM CNTR
BY COUNTRY
BY CAR
BY MODEL
ON COUNTRY SUBFOOT
"TOTAL CARS <CNTR2"
END
as i think you want a count rather than a SUM.
Alan. WF 7.705/8.007
Posts: 1451 | Location: Portugal | Registered: February 07, 2007
I was able to get the results I needed by moving the 2 last fields next to the Member Number and I am now getting the correct results. For some reason when I move them to the end it starts to count by policy even though it is set to details...