Forum Discussion
WillY_OneEyed
2 years agoNew Member
Calculate three months
Hi guys, I need to calculate 3 months separately, sum and divide by 3 and I did this but something is going wrong: _Measure =
VAR _kpi = SELECTEDVALUE(KPIs[KPIName])
VAR _currnetMonth...
WillY_OneEyed
2 years agoNew Member
Hi amitchandak, Thank you for the answer. I tested your "3 Month Avg" solution but the problem happens when I've a year filter applied. This filter is the default for this dashboard and can't be removed.
About the "Rolling 3 Avg" solution, I couldn't get it running because it gives an error of "few arguments"
WillY_OneEyed
2 years agoNew Member
When I've a year or a month visual filter applied, this measure doesn't work correctly
3 Month Avg =
CALCULATE (
AVERAGEX (
VALUES ( 'Calendar'[Key] ),
CALCULATE ( SUM ( 'Table'[KPI] ) )
),
DATESINPERIOD ( 'Calendar'[Date], MAX ( 'Calendar'[Date] ), -3, MONTH )
)