Forum Discussion

Pmorg73's avatar
Pmorg73
Icon for Post Patron rankPost Patron
4 years ago
Solved

3 month average - appears incorrect

Hi everyone

 

hopefully a quick one.

 

I am using this Dax pattern to calulcate a 3month average. I have a measure that calcs someones productivity. This image is the monthly values, but when I apply the pattern I am seeing value that do not appear correct. The final three months should be trending up surely? Any advice?

 

Dax measure as follows:

%ge Capacity 3 months =
AVERAGEX (
DATESINPERIOD (
'01_Calendar'[Date],
LASTDATE ( '01_Calendar'[Date] ),
-3,
MONTH),
DIVIDE([Billable Time], [Capacity Actual])
)
 

 

 
 
  • Pmorg73 , Try like

     

    calculate(
    DIVIDE([Billable Time], [Capacity Actual]) ,
    DATESINPERIOD (
    '01_Calendar'[Date],
    LASTDATE ( '01_Calendar'[Date] ),
    -3,
    MONTH) )

     

     

    or

     


    calculate(
    AverageX(values('01_Calendar'[Month year]) ,
    calculate(
    DIVIDE([Billable Time], [Capacity Actual]))) ,
    DATESINPERIOD (
    '01_Calendar'[Date],
    LASTDATE ( '01_Calendar'[Date] ),
    -3,
    MONTH) )

2 Replies

  • Pmorg73 , Try like

     

    calculate(
    DIVIDE([Billable Time], [Capacity Actual]) ,
    DATESINPERIOD (
    '01_Calendar'[Date],
    LASTDATE ( '01_Calendar'[Date] ),
    -3,
    MONTH) )

     

     

    or

     


    calculate(
    AverageX(values('01_Calendar'[Month year]) ,
    calculate(
    DIVIDE([Billable Time], [Capacity Actual]))) ,
    DATESINPERIOD (
    '01_Calendar'[Date],
    LASTDATE ( '01_Calendar'[Date] ),
    -3,
    MONTH) )

    • Pmorg73's avatar
      Pmorg73
      Icon for Post Patron rankPost Patron

      I tried the 2nd measure and it worked for me. thanks a lot