Forum Discussion
Anonymous
4 years agoNot applicable
How To Calculate dynamic projections
HI All i am trying to calculate dynamic projection for sales i have a defined start date as 01/05/2021 and a defined end date as 01/05/2023 i have a target of 375 sales across this perio...
- 4 years ago
Hi Anonymous ,
Please try the following formula:
Measure = var target = 375 var Months = 25 var SumAct = SUM ( 'Table'[actual sales] ) var DiffMonth = DATEDIFF ( CALCULATE ( MIN ( 'Date'[Date] ), FILTER ( ALL ( 'Date' ), SumAct = BLANK () ) ), MAXX ( ALL ( 'Date' ), 'Date'[Date] ), MONTH ) var AllAct = CALCULATE ( SUM ( 'Table'[actual sales] ), FILTER ( ALL ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] ) ) ) return IF ( SumAct <> BLANK (), target / Months - SumAct, ( target - AllAct ) / DiffMonth )
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-kkf-msft
4 years agoCommunity Support
Hi Anonymous ,
Please try the following formula:
Measure =
var target = 375
var Months = 25
var SumAct = SUM ( 'Table'[actual sales] )
var DiffMonth =
DATEDIFF (
CALCULATE (
MIN ( 'Date'[Date] ),
FILTER ( ALL ( 'Date' ), SumAct = BLANK () )
),
MAXX ( ALL ( 'Date' ), 'Date'[Date] ),
MONTH
)
var AllAct =
CALCULATE (
SUM ( 'Table'[actual sales] ),
FILTER ( ALL ( 'Date' ), 'Date'[Date] <= MAX ( 'Date'[Date] ) )
)
return
IF (
SumAct <> BLANK (),
target / Months - SumAct,
( target - AllAct ) / DiffMonth
)
If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.