Focal Point
[CLOSED] 8.1.05 Active Report Column Total and percentage Calc

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/7971057331/m/8547063686

May 08, 2017, 08:10 AM
LPD
[CLOSED] 8.1.05 Active Report Column Total and percentage Calc
In an Active Report, I used column total to get a grand total count of my CNT.DST.DocNum. To get a percentage of the total counts, I created a percentage field with PCT.CNT.DocNum hoping that it would divide against the Grand total counts to generate the percentage. Firstly, I would assumed that displayed value will be used for calculation but with some thought I think it needs to be 'manipulated' to get the result. So, I tried adding PCT.CNT.DST.Docnum to get the distinct count for the percentage calculation but it error out. Any insight on what I am doing wrong with this would be greatly appreciated. I just want to calculate the CNT.DST.DocNum/PCT.CNT.DST.DocNum (in concept).... Thanks

This message has been edited. Last edited by: FP Mod Chuck,


WebFOCUS 8
Windows, All Outputs
May 08, 2017, 08:27 AM
MartinY
Please share your code (and what would be better is to reproduce your issue with a sample IB file).

I do suspect that you're not processing the calculation at the right level/manner.
May need DEFINE and/or COMPUTE and/or other features.


WF versions : Prod 8.2.04M gen 33, Dev 8.2.04M gen 33, OS : Windows, DB : MSSQL, Outputs : HTML, Excel, PDF
In Focus since 2007
May 08, 2017, 10:07 AM
LPD
Since I am using Active Report /Dashboard mode. I basically let the GUI handles all the work (Column Total option). I didn't think I had to do DEFINE or COMPUTE in Active report/dashboard. However, I would love to see a sample of how you would calculate percentage field for a number of document grouped by a Division over the grand total counts. Since the DOC NUM is ALPHA field I can't really do SUM on it (therefore CNT.DST.DocNum) and I need the source to SUM it (I only know how to use InfoAssist and not good with the source). Also, I can't easily send the code from my work, sorry.


WebFOCUS 8
Windows, All Outputs
May 08, 2017, 10:20 AM
FP Mod Chuck
Hi LPD

On the Column Totals try using the recomputed instead of simple.

Hope this helps.


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats
May 08, 2017, 11:29 AM
LPD
Thanks for the input. It was already set to Recomputed. However, under 'More Options' I tried to change the Prefix and the only option is 'Count' , there is no count distinct. I think this is where the problem lies. I do 'Count Distinct' on the row total but when come to summary of the Grand Total , no option exists for Count Distinct - therefore, the percentage calculation used Count and NOT Count Distinct to calculate. If you check he prefix, I think this is what's missing.

This message has been edited. Last edited by: LPD,


WebFOCUS 8
Windows, All Outputs
May 08, 2017, 12:43 PM
LPD
Martin, to reply to your question. I did a test Count for row total instead of 'Count Distinct', the percentage calculations came out correctly. So, I think the problem is in the Column total 'More Options', we can only select 'Count' and not 'Count Distinct' as it should be consistent with the row totals. I think it's a bug and hope it will be fixed in 8.2.


WebFOCUS 8
Windows, All Outputs
May 08, 2017, 04:31 PM
FP Mod Chuck
LPD

You should open a case an report it. Then it will be on their radar if it is a bug.

Thanks


Thank you for using Focal Point!

Chuck Wolff - Focal Point Moderator
WebFOCUS 7x and 8x, Windows, Linux All output Formats