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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

Reply
larx_mandel
Frequent Visitor

Line chart does not paint X axis if Y axis value is blank.

Hi community,

 

I have a table in my model like:

 

Year MonthData
202411314
202421228
20243 
20244 
20245 
20246 
20247 
20248 
20249 
202410 
202411 
202412 

 

I want my Line chart to paint all values in X Axis, but is painting only the months with values.

 

larx_mandel_0-1710330316409.png

 

Is there an option to paint the rest of x axis (3 to 12) even if y axis is blank?

 

I change my X Axis to categorical, but no difference.

Thanks.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @larx_mandel ,

Please right click on the month field and then check show items with no data.

vkaiyuemsft_0-1710406361008.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

7 REPLIES 7
Anonymous
Not applicable

Hi @larx_mandel ,

 

You can change the type of the x-axis to Categorical, more information about this setting can be found in the documentation: Customize X-axis and Y-axis properties - Power BI | Microsoft Learn.

 

vkaiyuemsft_0-1710385540063.png

 

vkaiyuemsft_1-1710385540063.png

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

Hi @Anonymous  ,

 

Line chart is not working like yours on my system. 

 

Maybe Power bi desktop version is different? Or you have another configuration that I don´t? My Power BI version is 2.126.1261.0 64-bit (February 2024).

 

I modified your pbix file adding another line chart, but the behaviour of line chart is different from yours. 

 

I cannot attach pbix on this question, but the graphics looks like:

 

line.jpg

Thanks.

Anonymous
Not applicable

Hi @larx_mandel ,

Please right click on the month field and then check show items with no data.

vkaiyuemsft_0-1710406361008.png

 

If your Current Period does not refer to this, please clarify in a follow-up reply.

 

Best Regards,

Clara Gong

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

Hi @Anonymous ,

 

It works with option 'Show items with no data'. You save my day. Thanks for ypur help.

 

Best regards.

 

Idrissshatila
Super User
Super User

Hello @larx_mandel ,

 

you can replace blanks with zero.

 

check this https://www.youtube.com/results?search_query=power+bi+replace+blank+with+zero

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Hi @Idrissshatila ,

 

I offered this option to user, but does not want to have 0. Line change unexpectedly, for example from 1228 to 0. Graphic is not 'nice'.

 

Is there another solution?

Thanks.

@larx_mandel ,

 

well you can't put another number or else it would be missleading. there's no other way, either its zero or blank.

 

you can't put a number that you don't have, or it will be fake data.



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




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.