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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Syndicate_Admin
Administrator
Administrator

How to show in a graph of lines a given forecast

Hello, hopefully you can help me:

My doubt is I have the years 2019, 2020, 2021 and 2022 in filter until now. I only have the 2022 forecast of a series of data they gave me. When it comes to graphing the forecast, if the forecast appears but in ALL years, when it should appear in 2022 only. The forecast data was given to me and when I have information for 2023 and when they give me the forecast for that year, I have to get the 2023 forecast, and the 2022 forecast has to stay in 2022, and so on. My problem is that when I filter 2019 or any year I get the data from the 2022 forecast in the graph (blue line), the graph is called Total Carriers Forecast:

valeriavd1998_0-1663041430829.png

In conclusion, only the blue line should appear in 2022, as in the following graph:

valeriavd1998_1-1663041672811.png

1 ACCEPTED SOLUTION
v-easonf-msft
Community Support
Community Support

Hi, @Syndicate_Admin 

You can add a new measure like:

New Carriers Total =
VAR a =
    CALCULATE ( [Carriers Total], FILTER ( Sheet1, Sheet1[Year] = 2022 ) )
RETURN
    IF (
        ISFILTERED ( Sheet1[Year] ),
        IF ( SELECTEDVALUE ( Sheet1[Year] ) = 2022, a, BLANK () ),
        [Carriers Total]
    )

Best Regards,
Community Support Team _ Eason

 

 

View solution in original post

1 REPLY 1
v-easonf-msft
Community Support
Community Support

Hi, @Syndicate_Admin 

You can add a new measure like:

New Carriers Total =
VAR a =
    CALCULATE ( [Carriers Total], FILTER ( Sheet1, Sheet1[Year] = 2022 ) )
RETURN
    IF (
        ISFILTERED ( Sheet1[Year] ),
        IF ( SELECTEDVALUE ( Sheet1[Year] ) = 2022, a, BLANK () ),
        [Carriers Total]
    )

Best Regards,
Community Support Team _ Eason

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors