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
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
Super User
Super User

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
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.