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. Moving forward, myibi is our community platform to learn, share, and collaborate. We have the same Focal Point forum categories in myibi, so you can continue to have all new conversations there. If you need access to myibi, contact us at email@example.com and provide your corporate email address, company, and name.
Thanks GamP. This helped me get a start. Thought it might have something to do with using LAST command, but have not used it that much. Instead of just COMPUTE DIFF1 = LAST CUST_Y_PCT - CUST_Y_PCT; OVER I added:
IF CHNL_TYP EQ 'X' THEN LAST CUST_Y_PCT - CUST_Y_PCT ELSE 0; Otherwise, there was a calculation for the first ACROSS value which is zero - whatever value. This way, there was only a value displayed for the difference between the two across columns. But, not only did I not want calculated values outside of the values between across columns, I did not want to show anything. So...
I changed from ACROSS CHNL_TYP to BY, removed OVER's and HELD it. Then I built another report summed data using ACROSS and OVER's. This way, I was able to get that DIFF displayed in a footer.
Not sure if there is a simpler way, but this works the way I want.
thanks again, could not have done it without the advice.
BobThis message has been edited. Last edited by: BobV,
WF (App Studio) 8.2.01m / Windows Mainframe FOCUS 8
Maybe siomething like this is what you're looking for?
TABLE FILE CUSTOMER
SUM CNT.CUST OVER
COMPUTE CUST_Y_PCT/D12.2%= ( CUST_Y / CNT.CUST ) * 100; OVER
COMPUTE DIFF1 = LAST CUST_Y_PCT - CUST_Y_PCT; OVER
COMPUTE CUST_N_PCT/D12.2%= ( CUST_N / CNT.CUST ) * 100; OVER
COMPUTE DIFF2 = LAST CUST_N_PCT - CUST_N_PCT;
ACROSS-TOTAL AS 'TOTALS' AND RECOMPUTE
- Using AS 8.2.01 on Windows 10 - IE11.
in Focus since 1988
Posts: 1961 | Location: Netherlands | Registered: September 25, 2007