Forum Discussion

yugofukuda's avatar
yugofukuda
Icon for Helper IV rankHelper IV
6 years ago
Solved

12 month average on the same day

Hi,   For calculating a forecast, I would like to create the average of % on the same working day of last 12 months. I would be appreciated if you could help me. Thanks!!
  • mahoneypat's avatar
    mahoneypat
    6 years ago

    Please try this one instead.  I didn't notice before that you have the Month column in the visual (not dates).

     

    Collection % Last 12 Months =
    VAR thisdate =
    MAX ( 'Calendar'[Date] )
    VAR last12months =
    CALCULATETABLE (
    VALUES ( 'Calendar'[Month] ),
    ALL ( 'Calendar' ),
    'Calendar'[Date] <= EOMONTH ( thisdate, 0 ),
    'Calendar'[Date] >= EOMONTH ( thisdate, -11 )
    )
    RETURN
    AVERAGEX ( last12months, [Collection %] )
     

    If this works for you, please mark it as the solution.  Kudos are appreciated too.  Please let me know if not.

    Regards,

    Pat