Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calculate Percentage with Running Total 1

Status
Not open for further replies.

rbh123456789

Technical User
Mar 3, 2010
80
CA
CR 11.5

I have a crosstab which the columns are summarized by a date(month), and there are 2 summarized fields

1. Number of Applications Received
//the CT performs a DistinctCount on the CaseID (aka ID), which tells you how many applications were received

2. Number of Applications Self-Represented
//the CT contains a RT for this summary. The Running Total performs a DistinctCount, Summarizes the CaseID(aka ID), Resets on the change of Group (the month) and has an Evaluate formula of:

//RT Formula
(
isnull(maximum({@blank},{temp_rep_app.id})) or
trim(maximum({@blank},{temp_rep_app.id})) = ""
)
//

I want to add a Percentage to the Crosstab, which will calculate the % of Applications that were Self-Represented.

I have tried, but i keep getting errors about 'Not being able to summarize a Running Total'

Any help would be appreciated.

 
Create a formula {@0} and add it as your third summary:

whilereadingrecords;
0

This will act as a holder for the percentage. Right click on the distinctcount of caseID summary in both inner cells and row or column totals->format field->suppress->x+2 and enter:

whileprintingrecords;
numbervar tot := currentfieldvalue;
false

Then right click on the running total summary in both inner cells and row or column totals->format field->suppress->x+2 and enter:

whileprintingrecords;
numbervar rt := currentfieldvalue;
false

Then right click on the {@0} summary in both inner cells and row or column totals->format field->DISPLAY STRING->x+2 and enter:

whileprintingrecords;
numbervar tot;
numbervar rt;
if tot = 0 then
"--" else
totext(rt%tot,1)+"%" //1 for one decimal

-LB
 
LOL - oh my gosh, everything worked perfectly and it was exactly what i needed!!

lbass is amazing! thank you so much!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top