March 7, 2023, 4:57am
Despite a lot of googling and looking through this forum, I can’t work the following out:
I have a bar graph which displays the number of patients admitted to the stroke unit per month (pic 1).
I need this to actually display the percentage of admissions to the hospital which end up being admitted to the stroke unit.
I know the calculated field I created is incorrect as it’s now displaying as pic 2.
Can anyone help me with what the script should actually be?
For reference, this is my admissions per month graph:
@jotg - It seems you need to create a calculated field by dividing the 438Treatedinastrokeunit field by the admission field. Something like below and format that as percent
sum(treatedinstrokeunit) / sum(admitted)
Then project that field against the Date Dimension in Line chart. Hope this helps!
March 8, 2023, 5:49am
After some trial and error, rather than sum, it was more appropriate for me to use count.
And if anyone else has a similar query to mine, this is the script I used:
My chart now looks like this (which is exactly how I needed it):
Thanks again for your help.