Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rcGAWA
Contributor
Contributor

Calculating an average over days (including non-selected days)

I need to be able to calculate a daily average based on the following formula:

count(ED_attendanceid)/count(dateasdate)

However, I need it to calculate based on all dates within a range, not just those dates where selections are available.

For example, if I select patients who attended with appendicitis (from the complaint field in my dataset) in April, I would want the average per day based on the number of days in April. Currently my formula is only calculating the average based on the numbers of the days where patients attended with appendicitis. But I need it to be 30 for April. 

Users can select a weekly or monthly view of the data. I have buttons for to display the data for weekly and monthly - which work fine for actual numbers, but not daily average.

0 Replies