Forum Discussion
emma_3
3 years agoRegular Visitor
Needed Help in Forecasting through DAX
Need Help in Forecasting through DAX
Here are my measures:
Forecast 2 =
VAR Forecast =
CALCULATE(
[total orders],
DATEADD('Date'[Date],-1,YEAR)
)*(1+0.1)
return
IF(
YEAR(MAX('Date'[Date]))=2023,
Forecast
)
total orders = COUNT(Zentail[orderNumber] )
Expexted Output
1 Reply
- AnonymousNot applicable
Hi emma_3 ,
Suppose there are date columns in the Zentail table, and you want all dates in 2023 that are greater than the maximum date value in the Zentail table to be predicted values. Please try this measure.
Forecast 2 = VAR Forecast = CALCULATE ( [total orders], DATEADD ( 'Date'[Date], -1, YEAR ) ) * ( 1 + 0.1 ) VAR _max_date = CALCULATE(MAX('Zentail'[Date]),ALL()) RETURN SWITCH( TRUE(), ISBLANK ( [total orders] ), Forecast , _max_date = MAX('Date'[Date]),[total orders] )Best Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum