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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
madden318
Regular Visitor

Line graph - Line continues for months with no data

Have an issue with a line chart showing multiple lines each representing a year.  2016 line continues even though there is no data for november and december.  How can i get rid of this?Capture.PNG

6 REPLIES 6
alanhodgson
Solution Supplier
Solution Supplier

Hey @madden318,

 

Easy fix, go to the paint roll "Format" tab and under the "X-Axis" dropdown, change the type to "Categorical" instead of "Continuous". This should stop the graph at the last point.

 

Hope this helps,

 

Alan

Thanks Alan but it is already on the categorical setting.  Has this ever fixed it for you?

That works for me. It looks like PBI is defaulting your data for 2016 in the last 2 months to zero. Does it do the same thing for other types of graphs or is it just the line graph?

Yes it is definitley adding 0 values into may data where there is none.  Tried switching it to a line and stacked volume chart and it did the same thing.

Hi @madden318,

 

You should be able to use BLANK Function (DAX) to skip the value 0 in this scenario. For example, if you are showing "Total Sales" on the Line Chart.

Total Sales = SUM ( Sales[Revenue] )

Then you should be able to show the following measure instead on the Line Chart to skip the value 0.

Measure = IF ( [Total Sales] = 0, BLANK (), [Total Sales] )

 

Regards

I am typing this on an iPad and have not tested this so this is just a guess...

 

However I suspect your Calendar table runs till the end of the current year if not beyond...

 

so try adding a FILTER statement in the Measure you are charting to only calculate till today

 

something like this...

 

Measure = CALCULATE ( SUM (...), FILTER ( ALLSELECTED ( 'Calendar' ), 'Calendar'[Date] <= TODAY () )

 

Again I have not tested this - just a suggestion.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors