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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running Totals/Formulas & Charting... 1

Status
Not open for further replies.

Baah

Programmer
Sep 22, 2003
6
US
Hello,

I'm using CR 9 and I seem to be in a fix on how to accomplish this...

I have a set of company records with "ranks" like A, B, C, D and 'NULL'. I wanted two totals: (1) count of all records with ranks A, B & D and (2) All records. I was able to create a conditional running total for (1) and a straightforward running total for (2). I then display (1) divided by (2) as a percentage using a simple formula.

To give an example: Total(ABD)=25 and Total(AllRecords)=50 therefore (Total(ABD) / Total(AllRecords)) * 100 = 50%

I want to create a pie chart which has 50% of the pie as ABD (ie the 25 ABD records) and the other 50% as the total records count (50 records)...How do I accomplish this?

When I create the chart, I can add the two running totals but the pie chart shows the wrong values (ie) it shows a pie slice for 25 and 1 for 50 making the total to be 75 records which is not true. I want a 50-50 display.

Would really appreciate any help as I'm totally stuck on this...
 
Create two formulae:
Code:
//@ABD
if {rank} in ['A','B','D'] then '1' else '0'
and
Code:
//@nonABD
if {rank} in ['A','B','D'] then '0' else '1'
Then define your pie chart
"For all records"
Show values--> Count of @ABD
Count of @nonABD
 
Sorry, an obvious corrections: 0's and 1's should be without quotes, show values should be Sum (will create automatically).
 
It works! Hooray...thanks for the tip!!! [2thumbsup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top