7 Replies Latest reply on Dec 3, 2012 3:31 PM by SILVIO MARTINEZ

# Creating a Count from T/F Deminsions

I am trying create a count from a T/F demision without just making it a filter

Obviously, the below formula didn't work:

IF ATTR([DRGMatch])="True" THEN COUNT([DRGMatch])

END

Below is the desired view.

In addition, I am unable to create Grand Totals.  Any ideas?

Attached is a sample workbook (Not Real Data).  Thx in advance for any help.

• ###### 1. Re: Creating a Count from T/F Deminsions

if [DRGMatch] then 1 else 0 end

Then you can use a simple sum to get the number of trues. If you change all of your calcs like this you can get your grand totals. E.g.:

• ###### 2. Re: Creating a Count from T/F Deminsions

Thx for the help.

1 of 1 people found this helpful
• ###### 3. Re: Creating a Count from T/F Deminsions

Alex,

I got to the Same DRG numbers with your help.  Many Thx.   However, I need the Same DRG for within 30 days.

In other words, need a column next to Post Readmits with Same DRG, named Post Readmits with Same DRG within 30 days.  I would like to accomplish this without adding a filter for Readmits within 30 days as I will still need to get the numbers for Admissions.  If you notice the Q2 number Post Readmits with Same DRG is 12, for within 30 days, it should 6.

See attached.

• ###### 4. Re: Creating a Count from T/F Deminsions

Didn't quite follow, but does this work:

IF [DRGMatch] and [Readmits Within 30 Days Filter]=1 THEN 1 ELSE 0

END

1 of 1 people found this helpful
• ###### 5. Re: Creating a Count from T/F Deminsions

Thx.  How many ANDs can be used in an IF statement?

• ###### 6. Re: Creating a Count from T/F Deminsions

Don't know if there is a limit. You can also wrap in parentheses:

if (a and b) or (c and d) then....

1 of 1 people found this helpful
• ###### 7. Re: Creating a Count from T/F Deminsions

Much appreciated.