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

Totals and suppressed records

Status
Not open for further replies.

chris35

Technical User
Apr 21, 2003
24
0
0
US
Not sure if this is possible or not, but I am stumped.

I am pulling hospital lab data and the data presents as multiple copies of records, like so:

AN BillCode
S10295 TD
S10295 TD
S10295 TD
S10301 MDX
S10301 MDX

I have a detail suppression statement:
If not onfirstrecord then
AN = previous (AN)

This strips out the multiple copies and leaves the display as:

AN BillCode
S10295 TD
S10301 MDX

This is good, but I need summaries of total AN and number of AN with MDX and number of AN with TD. I can total AN using the distinct count grand total, but I am having trouble breaking out the numbers for MDX and TD because what I have tried (running total and some formulas) is counting the suppressed records.

Amy help would be greatly appreciated.
 
If you insert a group on {table.billcode}, you could insert a distinctcount on {table.AN} and get the correct summaries for each bill code. If you want to use running totals in order to get the summaries at the AN level, then have your running total do a distinctcount of {table.AN}, evaluate based on a formula:

{table.billcode} = "TD" //change to "MDX" for second RT

Reset on change of {table.AN}.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top