Skip to main content

Hi -

 

I'm trying to calculate a daily average case volume for the year or month and am getting the wrong answer because cases don't happen on every day of the year.  The case volume for 2016 is 3,383 and there were cases on 250 days.  On an annual basis the average calculated is 13.53.  The correct number of days in 2016 is 366 days so the correct average is 9.24.  I tried the LOD { FIXED [Case Date] : AVG([Volume]) } but that is wrong since it uses the Case Date.  Are there any ideas as to how to fill in for the missing days?  I am using version 10.1.1

 

Thanks for any help!

답변 5개
  1. 2016년 12월 19일 오후 2:52

    Hi,

     

    My suggestion is rather than try to pad out the data to just do a calculation that gets the number of days in the year and then divide by that, here are two calcs:

     

    Days in Year

    DATEPART('dayofyear',MAKEDATE(YEAR([Case Date]),12,31))

     

    Avg jtd

    //requires year in view to be accurate

    SUM([Volume])/MIN([Days in Year])

     

    And a view:

     

    Hi, My suggestion is rather than try to pad out the data to just do a calculation that gets the number of days in the year and then divide by that, here are two calcs: Days in YearDATEPART('dayofyear'

     

    v10.1 workbook is attached, let me know if you have any questions!

     

    Jonathan

0/9000