1 of 1 people found this helpful
You just need a little change of your perspective
Depending on your data you could be counting the before 11 discharges as:
IF DATEPART('hour', [TIME OF DAY]) <11 THEN 1 ELSE 0 END
That should give you the number of discharges (If you only have one row per patient :-) )
Hope it helps
Thanks - that got me back on the right track.
The data displays as two panes (horizontal bars) - one on the left is the number of discharges before 11 and the other is the total of all discharges. The next step is to display the percentage of number of discharges before 11 compared to all discharges. I tried analysis...percentage of...row and row in pane - but its giving me either 100% of both panes or the percentage is incorrect. I stumbled onto the correct answer briefly but have been unable to duplicate since. Any ideas?
See the attached - similar
Again, there is an assumption that there is only one row per event
There's a quick table calculation on sum(number of records)
percent.twbx.zip 1.1 MB
I'm writing from my mobile so I can't see the wiz that Alex did.
Create a New calc with [before 11]/[number of rows] and format it as pct it should give the calc you are looking for.
Just don't filter on the time of day (because that is aleeady done in the before 11-calc but it should work fine when used with day or day of week etc.
Thanks Alex - my apology for not responding sooner. This was helpful.