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!

filter out combinations in a crosstab

Status
Not open for further replies.

Patje

Programmer
Feb 3, 2003
30
0
0
BE
Hello smart people,

I've problem filtering certain combinations out of a crosstab. This is what I want to do...

I select all the patients and there number medical needs for each carecenter. I put the result in a crosstab like this:

MEDICAL NEEDS: A B C D
PATIENT NUMBER
Marc 125 3 5
Pete 23 5 1 3
Lisa 878 9
Eddy 89 10 7

What I want to do know is to place a count on the combination of medical needs. So what I want to know is
how many patient have medical needs "AC" or how many only
had medical need "D"... and this for every possible combination!

I've already tried using a variable with an "IF THEN statment" but this doesn't seem to work...

Any Idea?

Anyone?

P.

 
Hi Sridharan,

could you give me a little more infromation?
I get an error when I try to do so...

ex.

= count<nr of treatments> where <type> = &quot;A&quot; and <type> not inlist (&quot;B&quot;,&quot;C&quot;,&quot;D&quot;)

thanks,

P.
 
Just an Approach:

Create 4 variables:

amt_a : =<nr of treatments> Where (<type>=&quot;A&quot;)
amt_b : =<nr of treatments> Where (<type>=&quot;B&quot;)
..............................
amt_d : =<nr of treatments> Where (<type>=&quot;D&quot;)

A check on combination AC can then be:

= If (<amt_a>+<amt_c> > <amt_a>) Then &quot;AC&quot; Else &quot;&quot;

Checking on AC combination where D AND C do not exist:

= If (<amt_a>+<amt_b>><amt_a> And <amt_c>+<amt_d> =<amt_c>
And <amt_c>+<amt_d> =<amt_d>) Then &quot;AB&quot; Else &quot;&quot;

Have fun with all your combinations !!!!!!

T. Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top