Douglas Lee 2 Posted October 16, 2020 Posted October 16, 2020 Has anyone been successful in using the Aggregate WITHIN functionality in InfoAssist Im looking for this: From this: image.png858529 53.6 KB REF: Multi Verb Request in InfoAssist
NYCBabak . Posted October 19, 2020 Posted October 19, 2020 Its working in 8207. I dont see an Aggregation prefix for Unit Sales in your example. image.png1156502 52.9 KB
Douglas Lee 2 Posted October 19, 2020 Author Posted October 19, 2020 Thanks, Thats a relief that its in 8207 nycbabak: I dont see an Aggregation prefix for Unit Sales in your example. Thanks what the 1st use of Unit Sales is.
Douglas Lee 2 Posted October 20, 2020 Author Posted October 20, 2020 @nycbabak NYCBabak, What version of 8207 are you using We need to know if thats being backported to 8206. Also, please show your code for whats shown above Also, can you do that within COUNTRY instead of CAR
NYCBabak . Posted October 20, 2020 Posted October 20, 2020 I just tested the same code in 8206.23 and it too works as expected. The code it generates is: TABLE FILE ibisamp/car SUM CAR.BODY.DEALER_COST PCT.CAR.BODY.DEALER_COST WITHIN CAR.COMP.CAR BY CAR.ORIGIN.COUNTRY BY CAR.COMP.CAR BY CAR.CARREC.MODEL
Douglas Lee 2 Posted October 20, 2020 Author Posted October 20, 2020 Thanks for that. Now, Can you do that within COUNTRY instead of CAR
NYCBabak . Posted October 20, 2020 Posted October 20, 2020 TABLE FILE ibisamp/car SUM CAR.BODY.DEALER_COST PCT.CAR.BODY.DEALER_COST WITHIN CAR.ORIGIN.COUNTRY AS DEALER_COST,within COUNTRY PCT.CAR.BODY.DEALER_COST WITHIN CAR.COMP.CAR AS DEALER_COST,within CAR BY CAR.ORIGIN.COUNTRY UNDER-LINE RECOMPUTE SUM. CAR.BODY.DEALER_COST SUM. PCT.CAR.BODY.DEALER_COST AS Subtotal: BY CAR.COMP.CAR BY CAR.CARREC.MODEL image.png1433703 64 KB
Douglas Lee 2 Posted October 20, 2020 Author Posted October 20, 2020 Thanks Again I was on a call Was that code generated in IA Were on 8206.11. So, well see that soon.
NYCBabak . Posted October 20, 2020 Posted October 20, 2020 Yes as you can see in the image, Im right clicking PCT.DCOST and picking WITHIN whatever fields are in the BY list.
Douglas Lee 2 Posted October 21, 2020 Author Posted October 21, 2020 Would you please try one more, as follows, using GGsales do you get .00 as percentages or accurate decimals Note that UNITS is I08 and the result is displayed in the actual format of the source field. TABLE FILE ibisamp/ggsales SUM GGSALES.SALES01.UNITS PCT.GGSALES.SALES01.UNITS WITHIN GGSALES.SALES01.DATE PCT.GGSALES.SALES01.UNITS/D12.2% WITHIN GGSALES.SALES01.DATE BY LOWEST 5 GGSALES.SALES01.DATE RECOMPUTE AS Subtotal: BY GGSALES.SALES01.CATEGORY
NYCBabak . Posted October 21, 2020 Posted October 21, 2020 Unit Sales is an I8 field. Reformatting it to a D12.2 wont make the rounding problem go away. You need to DEFINE a new field instead of /D12.2. DEFINE FILE ibisamp/ggsales UNIT_SALES_D/D12.2=GGSALES.SALES01.UNITS ; END ENGINE INT CACHE SET ON SET PAGE-NUM=NOLEAD SET SQUEEZE=ON -DEFAULTH &WF_HTMLENCODE=ON; SET HTMLENCODE=&WF_HTMLENCODE SET HTMLCSS=ON -DEFAULTH &WF_EMPTYREPORT=ON; SET EMPTYREPORT=&WF_EMPTYREPORT -DEFAULTH &WF_ARVERSION=2; SET ARVERSION=&WF_ARVERSION -DEFAULTH &WF_SUMMARY=Summary; -DEFAULTH &WF_TITLE=WebFOCUS Report; TABLE FILE ibisamp/ggsales SUM GGSALES.SALES01.UNITS PCT.UNIT_SALES_D WITHIN GGSALES.SALES01.DATE BY GGSALES.SALES01.DATE RECOMPUTE AS Subtotal: BY GGSALES.SALES01.CATEGORY ON TABLE PCHOLD FORMAT HTML ON TABLE NOTOTAL ON TABLE SET CACHELINES 100 ON TABLE SET GRWIDTH 1 ON TABLE SET STYLE * INCLUDE=IBFS:/FILE/IBI_HTML_DIR/ibi_themes/Warm.sty,$ TYPE=REPORT, TITLETEXT=&WF_TITLE.QUOTEDSTRING, SUMMARY=&WF_SUMMARY.QUOTEDSTRING, ORIENTATION=LANDSCAPE, $ ENDSTYLE END -RUN image.png946497 48.7 KB
Douglas Lee 2 Posted October 21, 2020 Author Posted October 21, 2020 Thanks for the verification @nycbabak, Its not intuitive as I would like. But, it does make sense that the percentage is displayed in the same format as the source field. Ill add this to my work-arounds.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now