Forum Discussion

andy_tolle's avatar
andy_tolle
Regular Visitor
8 years ago
Solved

Multiple years of Financial forecasts: differences?

I have a table that contains a bunch of financial forecasts for multiple years. For example purposes, I simplified it to it's bare essence:   Note for example that: In the forecast of...
  • v-sihou-msft's avatar
    v-sihou-msft
    8 years ago

    andy_tolle

     

    Firstly, you should unpivot your table like below: 

     

     

    Then you can create calculated column to get  the PreviousYearForcast: 

     

    PreviousYearForecast =
    CALCULATE (
        SUM ( 'Table'[Forecast] ),
        FILTER (
            'Table',
            'Table'[Year]
                = EARLIER ( 'Table'[Year] ) - 1
                && 'Table'[AccountNumber] = EARLIER ( 'Table'[AccountNumber] )
                && 'Table'[BudgetYear] = EARLIER ( 'Table'[BudgetYear] )
        )
    )

    Now you just need to use Forecast column minus PreviousYearForecast to get the difference: 

     

    Difference = IF([PreviousYearForecast]=BLANK(),BLANK(),'Table'[Forecast]-'Table'[PreviousYearForecast])

     

    Regards,