Forum Discussion
Progressive Average
- Anonymous7 years ago
Hi,
Thank you for your answer. The problem I am facing is to do the spread over the three months.
Now I'm trying to use this formula:MM - ManMonths (Media - I Round)_MM = CALCULATE(AVERAGE(MM[MP_PLAN_DELTA_MM]);DATESINPERIOD(MM[DATE_PERIOD].[Date];MM[DATE_PERIOD]; 2;MONTH))
It seems to be fine in the total picture. As soon as I try to use some filters, it no longer makes sense.
Can I send you the file so you can actually see what my problem is?Dom
Anonymous ,
To be general, you may modify the measure like pattern below:
Result =
VAR Current_Month =
MONTH ( COPR_DETAIL[DATE_PERIOD] )
VAR Previous_Month = Current_Month - 3
RETURN
CALCULATE (
SUM ( COPR_DETAIL[MP_PLAN_DELTA] );
FILTER (
COPR_DETAIL;
COPR_DETAIL[DATE_PERIOD] <= Current_Month
&& COPR_DETAIL[DATE_PERIOD] >= Previous_Month
)
)
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous7 years agoNot applicable
Hi,
Thank you for your answer. The problem I am facing is to do the spread over the three months.
Now I'm trying to use this formula:MM - ManMonths (Media - I Round)_MM = CALCULATE(AVERAGE(MM[MP_PLAN_DELTA_MM]);DATESINPERIOD(MM[DATE_PERIOD].[Date];MM[DATE_PERIOD]; 2;MONTH))
It seems to be fine in the total picture. As soon as I try to use some filters, it no longer makes sense.
Can I send you the file so you can actually see what my problem is?Dom
- v-yuta-msft7 years agoCommunity Support
Anonymous ,
Anonymous wrote:
Hi,
Thank you for your answer. The problem I am facing is to do the spread over the three months.
Now I'm trying to use this formula:MM - ManMonths (Media - I Round)_MM = CALCULATE(AVERAGE(MM[MP_PLAN_DELTA_MM]);DATESINPERIOD(MM[DATE_PERIOD].[Date];MM[DATE_PERIOD]; 2;MONTH))
It seems to be fine in the total picture. As soon as I try to use some filters, it no longer makes sense.
Can I send you the file so you can actually see what my problem is?Dom
Which field does the filter apply on? To be general, you can use function ALLSELECTED() to apply the filters in your measure. You can upload the sample file to onedrive.
Community Support Team _ Jimmy Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous7 years agoNot applicable
Hi,
I solved the problem with the DATESINPERIOD formula I used 60 days instead of 2 months.I don't know the problem but it is the solution.