Casey Green Posted May 12, 2021 Share Posted May 12, 2021 Hello, I am building a report that uses row totals to calculate an average value for the row. Usually when calculating percent or averages in a COLUMN total, Ill select the Recalculate totals option (so that it doesnt simply add the percent values together). This doesnt seem to be an option when adding row totals. Does anyone know of a way to have the row totals recalculate in the same way that column totals can recalculate Thank you! Link to comment Share on other sites More sharing options...
Martin Yergeau Posted May 13, 2021 Share Posted May 13, 2021 Dont know which tool you are using and where to find this option for your specific tool, but it is possible to do TABLE FILE CAR SUM RETAIL_COST DEALER_COST SEATS COMPUTE RATE/P8.2 = (RETAIL_COST - DEALER_COST) / SEATS; BY COUNTRY ACROSS SEATS RECOMPUTE ON TABLE RECOMPUTE END Link to comment Share on other sites More sharing options...
Brian Suter Posted May 13, 2021 Share Posted May 13, 2021 Exactly right - the RECOMPUTE option causes compute expressions to be reevaluated with the subtotal data. It does not affect the column function. Link to comment Share on other sites More sharing options...
Casey Green Posted May 13, 2021 Author Share Posted May 13, 2021 Sorry, I should have specified Im using WebFocus Designer. I have the ON TABLE RECOMPUTE in my text file and is correctly recalculating column totals. When I include the ACROSS fieldname RECOMPUTE, and run the table it returns an error. Does the ACROSS line apply just to the field SEATS in your example Would I need to include this line after every row I want recalculated Link to comment Share on other sites More sharing options...
Martin Yergeau Posted May 13, 2021 Share Posted May 13, 2021 Yes, only SEATS is an ACROSS field Can you share your code or at least a screen shot your BY/ACROSS/SUM/PRINT fields Link to comment Share on other sites More sharing options...
Casey Green Posted May 13, 2021 Author Share Posted May 13, 2021 Of course! The row AVERAGE SPEND is where Id like to make sure the row totals are recalculating. Thank you again for the assistance. row totals_text file.jpg1836786 348 KB Link to comment Share on other sites More sharing options...
Martin Yergeau Posted May 14, 2021 Share Posted May 14, 2021 To have RECOMPUTE working, you need a COMPUTE which you dont The only COMPUTE that you have is just the display of an existing field in the source table. So basically its not a COMPUTEd field since you do not perform any calculation for AVE_SPEND. As per my sample I do perform calculation. And RECOMPUTE just tell FOCUS to re-apply the calculation at the total instead of performing a column/row total Link to comment Share on other sites More sharing options...
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