Forum Discussion
Forecast based on what-if parameter commencing after actuals
- 3 years ago
Hello Paulo84
please see see this possibility:
Project open accounts = var _periode = SELECTEDVALUE('Table'[Year_Month_ID])+1 - (YEAR(TODAY())*100+MONTH(TODAY())) var _last_month = CALCULATE( MAX('Table'[Year_Month_ID]), FILTER(ALL('Table'),'Table'[Open Accounts]<>BLANK()) ) var _value = CALCULATE( sum('Table'[Open Accounts]), FILTER(ALL('Table'),'Table'[Year_Month_ID]=_last_month) ) return if( [Total Open Accounts] = BLANK(), _periode*[Project Monthly Member Gain] + _value, BLANK() )also i share an example so can compare with yours in the following LINK:
Best regards
Bruno Costa | Solution Supplier
Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! π
Take a look at the blog: PBI Portugal
- 3 years ago
Thanks for reply onurbmiguel_ !
Unfortunately, your solution didn't quite work with my existing measures - However, I tweaked it slightly to produce the outcome I was looking for:Forecast open accounts = VAR _date = SELECTEDVALUE('DATE'[End of month]) VAR LatestDate = CALCULATE( MAX('DATE'[end of month]), FILTER(ALL('DATE'), NOT(ISBLANK([Total Open Accounts]))) ) VAR MonthNumDifference = CALCULATE( DATEDIFF(LatestDate, _date, MONTH) ) VAR LatestCount = CALCULATE( [Total Open Accounts], FILTER(ALL('DATE'), 'DATE'[end of month] = LatestDate) ) VAR NetMbrGain = [Projected Monthly Mbr Gain] VAR MonthlyDefections = 'Parameter - Monthly Defections'[Parameter Value] RETURN IF( _date <= LatestDate, BLANK (), (NetMbrGain * MonthNumDifference) + LatestCount )
Many thanks for your assistance!
Thanks for reply onurbmiguel_ !
Unfortunately, your solution didn't quite work with my existing measures - However, I tweaked it slightly to produce the outcome I was looking for:
Forecast open accounts =
VAR _date = SELECTEDVALUE('DATE'[End of month])
VAR LatestDate =
CALCULATE(
MAX('DATE'[end of month]),
FILTER(ALL('DATE'), NOT(ISBLANK([Total Open Accounts])))
)
VAR MonthNumDifference =
CALCULATE(
DATEDIFF(LatestDate, _date, MONTH)
)
VAR LatestCount =
CALCULATE(
[Total Open Accounts],
FILTER(ALL('DATE'), 'DATE'[end of month] = LatestDate)
)
VAR NetMbrGain = [Projected Monthly Mbr Gain]
VAR MonthlyDefections = 'Parameter - Monthly Defections'[Parameter Value]
RETURN
IF(
_date <= LatestDate,
BLANK (),
(NetMbrGain * MonthNumDifference) + LatestCount
)
Many thanks for your assistance!
- onurbmiguel_3 years ago
Power Participant
Hello,
You didn't share the model, so I tried to come up with some dummy values ββto help you out.
You kind of replicated my logic, can you please accept my solution?Best regards
Bruno Costa | Solution Supplier
Did I help you to answer your question? Accepted my post as a solution! Appreciate your Kudos!! π
Take a look at the blog: PBI Portugal