Forum Discussion
slyfox
Helper II
9 years agoprevious month
Hello, I have two linked tables, Fact_Sales and Dim_Callendar Requred a mesure with average calculation for the: Case A: Sum of Sales Qty for the last three months excluding current, divided by n...
mrslyfox
Helper II
9 years agoPhil_Seamark
Microsoft Employee
9 years agoHi mrslyfox
I think it might be a case of just tweaking the date ranges. eg. the -3 to -2 as I have highlighed in red
Sum of Last Three Months inc current =
SUMX(
DATESINPERIOD(
Dim_Calendar[Date],
DATEADD(STARTOFMONTH('Dim_Calendar'[Date]),-2,MONTH),
3,
MONTH),
[Total Amount]
)- mrslyfox9 years ago
Helper II
Hello Phil_Seamark
yes, your measure is working as expected,
How to calculate number of callendar days from currently selected 25-Apr till 1st of Feb ?