B
BruceS
Objective: Based on an existing table, generate a table of the five
most common primary diagnoses given during a time period specified by
the user. (If there are two or more diagnoses with identical counts at
position five, I'd want all of these included in the table.) I'd
like three columns in the table: Dx Code, Dx Label, and % of the total
for the time period specified. As an example, suppose that tblAllDates
has 12,000 records of diagnoses; that for the time period 7/1/04
through 6/30/06, a total of 6,000 diagnoses were given; and that for
this time slice, the single most common diagnosis, with a count of 600,
was Schizophrenia Paranoid Type, which carries a code of 295.30. I'd
like the first data row in my table to read |295.30 |Schizophrenia
Paranoid Type |10% |
I can write a parameter query and use the Top Values box, but I can't
figure out how to generate the entries for that third column. Thanks
for any help.
most common primary diagnoses given during a time period specified by
the user. (If there are two or more diagnoses with identical counts at
position five, I'd want all of these included in the table.) I'd
like three columns in the table: Dx Code, Dx Label, and % of the total
for the time period specified. As an example, suppose that tblAllDates
has 12,000 records of diagnoses; that for the time period 7/1/04
through 6/30/06, a total of 6,000 diagnoses were given; and that for
this time slice, the single most common diagnosis, with a count of 600,
was Schizophrenia Paranoid Type, which carries a code of 295.30. I'd
like the first data row in my table to read |295.30 |Schizophrenia
Paranoid Type |10% |
I can write a parameter query and use the Top Values box, but I can't
figure out how to generate the entries for that third column. Thanks
for any help.