Returns an INTEGER value that is the total number of selected records in the file or files you are using across break groups.
COUNT-OF ( break-group )This procedure sorts all customers by state and then calculates the percentage of the total number of customers that are in each state. The COUNT-OF function provides the calculation with the number of customer records in the database.
FOR EACH Customer NO-LOCK BREAK BY Customer.State:DISPLAY Customer.CustNum Customer.Name Customer.SalesRep Customer.State.ACCUMULATE Customer.State (SUB-COUNT BY Customer.State).IF LAST-OF( Customer.State) THENDISPLAY 100 * (ACCUM SUB-COUNT BY Customer.State Customer.State) /COUNT-OF(Customer.State) FORMAT "99.9999%"COLUMN-LABEL "% of Total!Customers".END.
© 2013 Progress Software Corporation and/or its subsidiaries or affiliates. |