Forum Discussion
Rolling Average FYTD
Hi Community. Looking for some help with the below measure code.
I'm trying to return the FYTD for the months which have elapsed in this current financial year to date.
Currently, the measure is summing up the average for each month and then returning the total. However i want the measure to acknowledge that only 2 months of the financial year have passed and calculate the average based on the total average (the sum of the average per month)/2 (the months elapsed this financial year, excluding current month).
Can anyone recommend how i can upgrade this measure to meet that need?
Average Days per Personrolling average FY Month =
IF(
ISFILTERED('Calendar (DAX)'[Date]),
VAR _LAST_DATE = ENDOFMONTH('Calendar (DAX)'[Date])
VAR _DATE_PERIOD =
DATESBETWEEN(
'Calendar (DAX)'[Date],
STARTOFMONTH(DATEADD(_LAST_DATE, -12, MONTH)),
ENDOFMONTH(DATEADD(_LAST_DATE, 1, MONTH))
)
RETURN
AVERAGEX(
CALCULATETABLE(
SUMMARIZE(
VALUES('Calendar (DAX)'),
'Calendar (DAX)'[FiscalYear]
, 'Calendar (DAX)'[date]
),
_DATE_PERIOD
),
CALCULATE([Average Days per Person], ALL('Calendar (DAX)'[Date]))
)
)6 Replies
- Ashish_Mathur
Super User
Hi,
Share some data and show the expected result. Also, please clarify when does your Financial Year start
- AnonymousNot applicable
Hi there
Thanks for the reply. The financial year begins 01 July 2019. The Rolling average column in the below is the execpted result.Financial Year Financial Year Month Financial Year Month Number Average Days per Person People Days Rolling Average 2020 July 1 1.050611546 2452.8 2576.94 1.050611546 2020 August 2 0.680504071 2444.1 1663.22 1.390863582 2020 September 3 0 0 2020 October 4 0 0 2020 November 5 0 0 2020 December 6 0 0 2020 January 7 0 0 2020 February 8 0 0 2020 March 9 0 0 2020 April 10 0 0 2020 May 11 0 0 2020 June 12 0 0 - Ashish_Mathur
Super User
Hi,
How did you calculate the Rolling average of August as 1.390863582? Please elaborate. Also, share the link from where i can download your PBI file.