Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Forecasting future months using YTD Average

Hi there I was wondering if you can shed some ligth on the following issue. I have been building the table below using DAX Measures, but my FORECAST measure is not running properly.   02. Year...
  • Icey's avatar
    4 years ago

    Hi Anonymous ,

     

    Try this:

    FORECAST =
    IF (
        ISBLANK ( SUM ( 'Fact Table'[MONTHLY ACTUALS] ) ),
        CALCULATE (
            [YTD ACTUAL MONTHLY AVERAGE],
            DATES[YearMonth] < MAX ( DATES[YearMonth] )
        )
    )
    

     

    Best Regards,

    Icey

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • Anonymous's avatar
    Anonymous
    4 years ago

    Thank you Icey.

    I changed my approach and did the calculation a bit different and now is working.

     

     

    Here is the code I used to arrive to the EOFY Expected Result based on YTD Actual Monthly Average:

    FULL YEAR EXPECTED OUTCOME = 
    VAR MonthstoEOFY = 
    CALCULATE( MEDIAN ( DATES[02. FY Periods Remaining] ) ,
        KEEPFILTERS ( VALUES ( 'DATES'[Date] ) ) ) 
    
    RETURN 
    CALCULATE([YTD ACTUAL] + ([YTD ACTUAL MONTHLY AVERAGE] * MonthstoEOFY),
           'DATES'[02. Offset - CurMonth] < 0 )
     

     

    I created a remaining months column in my Dates table to help me with this measure.

    A bit of rounded way, but it is giving me the results I need. So much to learn ðŸ˜…  

    Thank you so much for your help.

    Cheers

    Jose M