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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
kylemaslak
Regular Visitor

Line chart help (forecasting)

Hi,

 

I am looking to try and add forecasting to my dataset if possible.

I tried adding a date table but received an error that my data isn't evenly spaced.

 

Any help would be greatly appriciated

 

Here is a link to my pbix file https://www.dropbox.com/s/d8xgudgl7ylb4c8/test.pbix?dl=0

 

Another issue I have is on my cumulative line charts. If there is a month with no sales of a product the line for that year does not remain flat, it just disappears. Any reccomendations on how to fix this would be awesome.

 

cumulative line chart.JPG

1 ACCEPTED SOLUTION

Hi @kylemaslak 

You may create a table as a calendar table.Then create the measures.Please check Page2 in attached file.

year over year fitting =
CALCULATE (
    SUM ( Test[Fitting Qty] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        AND (
            'Table'[Date] <= MAX ( 'Table'[Date] ),
            YEAR ( 'Table'[Date] ) = YEAR ( MAX ( 'Table'[Date] ) )
        )
    )
)

Regards,

Cherie

 

Community Support Team _ Cherie Chen
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
HotChilli
Community Champion
Community Champion

You could use the old "+ 0" trick for your measure to generate a 0 when there is no data

Hi @kylemaslak 

You may create a table as a calendar table.Then create the measures.Please check Page2 in attached file.

year over year fitting =
CALCULATE (
    SUM ( Test[Fitting Qty] ),
    FILTER (
        ALLSELECTED ( 'Table' ),
        AND (
            'Table'[Date] <= MAX ( 'Table'[Date] ),
            YEAR ( 'Table'[Date] ) = YEAR ( MAX ( 'Table'[Date] ) )
        )
    )
)

Regards,

Cherie

 

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

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.