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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
GeekAlfPro
Helper V
Helper V

How to display a projection on a graph based on last year's data?

Hi,

 

i have a graph, wherin i display day by day bike's rental.

I'd like 

GeekAlfPro_0-1701107747296.png

I'd like to display one-year forecasts (red lines) based on last year's data.

the measure i use to display the rental's is 

m_Nb_Vélo_actuellement_loues = 
CALCULATE(
COUNTX(
    FILTER(
        'Nombre total',
        'Nombre total'[Date Debut Loc] <=max('Date'[Date]) 
        
        &&(//ISBLANK('Nombre total'[Date retour])||
         'Nombre total'[Date réelle Retour Vélo]>= MAX('Date'[Date]))
        
        && 'Nombre total'[N° Mat interne] <> "A ATTRIBUER"
        ), 
        ('Nombre total'[N° Mat interne])
        
        
    ),
    CROSSFILTER('Nombre total'[Date Debut Loc],'Date'[Date],None)

How can i do ?

with a sameperiodlastyear ?

 

Thanks

1 REPLY 1
Anonymous
Not applicable

Hi @GeekAlfPro ,

 

(1) You can create a line chart and then turn on Forecasting in the Analysis pane. Refer this, please note the limitations of this feature.

vtangjiemsft_0-1701224844559.png

(2)Create a trendline using dax.

For more information, please refer:

How To Do Trend Analysis In Power BI Using DAX (enterprisedna.co)

Creating Forward Forecasts in Power BI Using DAX (enterprisedna.co)

 

Best Regards,

Neeko Tang

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

 

 

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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