Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Show next years forecast based on slicer selection

Hi Experts 

 

My years slicer comes from Dim_Date Table the Dim_Date table links to Forecast Table via  a Bridge period as the forecast tabke is based on 12 months forecast. (Months Dim_Date links to Months Forecast Table)

 

Scenario.

I want to select say year 2020 from.slicer and show in a matrix table forecast for 2021, likewise of i select 2019 I want to show 2020 forecast and so on..

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

Based on your description, I have created this sample table:

sales.png

Create this measure:

Next year forecast =
IF (
    ISFILTERED ( 'Calendar'[Date].[Year] ),
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date].[Year]
                = SELECTEDVALUE ( 'Calendar'[Date].[Year] ) + 1
        )
    ),
    "Please select a year to forecast"
)

year.png

Attached a sample file in the below, hopes to help you.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-yingjl
Community Support
Community Support

Hi @Anonymous ,

Based on your description, I have created this sample table:

sales.png

Create this measure:

Next year forecast =
IF (
    ISFILTERED ( 'Calendar'[Date].[Year] ),
    CALCULATE (
        SUM ( 'Table'[Sales] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date].[Year]
                = SELECTEDVALUE ( 'Calendar'[Date].[Year] ) + 1
        )
    ),
    "Please select a year to forecast"
)

year.png

Attached a sample file in the below, hopes to help you.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@Anonymous ,You can use year ahead measure 

example

Year ahead Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],1,Year))

next year

Next year Sales = CALCULATE(SUM(Sales[Sales Amount]),nextyear('Date'[Date]))

Next  YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD(dateadd('Date'[Date],1,Year),"12/31"))

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.