Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Forecast per Company distributed yearly

Hello Experts,   I have a revenue data for each company distributed from 2017 to 2030. I want to calculate forecast from the selected year until the last year, that is 2030. Data seems like followi...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi, Anonymous 

    You can create a new measure, try the following DAX expression:

     

    Forecast = 
    VAR LastYear = MAX('Table'[Year])
    VAR GrowthRate = 0.07 -- Adjust this based on your data
    RETURN
    SUMX(
        FILTER(
            'Table',
            'Table'[Year] >= LastYear
        ),
        'Table'[Revenue] * (1 + GrowthRate)
    )
    

     

     

    If you want to select 2022, the table will show numbers for 2022 and beyond instead of 2017, you can create a new table

     

    Table 2 = VALUES('Table'[Year])

     

    Then create a new measure:

     

    Revenure measure = 
    VAR _Slicer = MAX('Table 2'[Year])
    RETURN 
    IF(MAX('Table'[Year])<_Slicer,BLANK(),SUM('Table'[Revenure]))

     

    Put revenure measure and Forevast in matrix view, and put table 2 [year] in slicer view:

     

    Here is my preview:

     

    How to Get Your Question Answered Quickly

    Best Regards

    Yongkang Hua

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