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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Pmorg73
Post Patron
Post Patron

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_0-1645577749557.png

 

 
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@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) )

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@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) )

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.