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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
ArjunGrewal_
Frequent Visitor

Displaying All Months on a Continuous Line Chart

Hi all,

 

I have a line chart that displays months Mar, May, Jul, Aug, and Nov (first image). But I would like it to display all months, and I have to use a continuous type of chart because I only have four months of data. I'm using date hierarchy and have the "show items with no data" function enabled, but it still only shows five months.

 

If I filter on date hierarchy by just month, it shows all months like I want it to, but the months that have data are all bunched on the right side of the graph (shown on second image).

 

I've been trying to figure this out for a few hours, can anyone assist me please?

 

Thanks

 

First image: 2023-05-16_09-59-28.png

Second image: 

2023-05-16_10-09-03.png

3 ACCEPTED SOLUTIONS
Ritaf1983
Super User
Super User

Hi @ArjunGrewal_ 
The problem in the second picture is caused by the fact that the correct sorting for the months was not defined
The months should be sorted in words according to their serial numbers as in the image below.

Ritaf1983_0-1684372627907.png

 


After that, using
"show items with no data"
Will give you the results you need.

If it still does not work, please attach a PBIX
I will show you how it works on your example with a small example.

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

Hi @Ritaf1983

 

Thank you that practically solved it!

 

Only small issue I have now is that the months are showing as integers and not as the month names (eg. feb = 2, apr = 4, etc.)

 

Thanks again

View solution in original post

Hi @ArjunGrewal_ 

Trying to figure out where you go wrong is a bit hard for me.
I have prepared a sample file with an example for you to download:

Link to PBIX 

You can download a video of the work steps here:

Link to video 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

12 REPLIES 12
Ritaf1983
Super User
Super User

Hi @ArjunGrewal_ 
The problem in the second picture is caused by the fact that the correct sorting for the months was not defined
The months should be sorted in words according to their serial numbers as in the image below.

Ritaf1983_0-1684372627907.png

 


After that, using
"show items with no data"
Will give you the results you need.

If it still does not work, please attach a PBIX
I will show you how it works on your example with a small example.

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Here's a photo of the correct sorting of months in words according to their number:

month sort.png

 

When I use the month name as my x-axis I still get the same result as the second image.

When I use month ID as my x-axis I get 2, 4, 6, 8, 10, and 12.

When I use the date column as my x-axis I get the same as the first image.

 

I believe I followed your instructions.. but if not can you clarify? @Ritaf1983 

Hi @ArjunGrewal_ 

Trying to figure out where you go wrong is a bit hard for me.
I have prepared a sample file with an example for you to download:

Link to PBIX 

You can download a video of the work steps here:

Link to video 

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

So this is what happens when I do that:

2023-05-19_09-34-06.png

 

But I want the graph to be continuous like the first image in my original post. The best I could get is Mar, May, Jul, Sep, and Nov. I would be fine if I could get Feb, Apr, Jun, Aug, Oct, and Dec though.

As you can see in the file I sent, it works perfectly.
I do not know why it works differently for you without seeing your file.
Could you please share PBIX so that I can understand what you are trying to do?

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Here is an example of what I want:

2023-05-23_09-39-08.png

My x-axis has data for month 2, 8, 10, and 12 but it still goes through months 4 and 6. The only issue is instead of the month number, I want the month name. But when I try to use month name instead of month number my data points don't connect to each other.

I can't share my file unfortunately, but it works the same as the file you sent, however the result you produced isn't exactly what I wanted. I got Jan-Dec on the x-axis as desired, but I want my points to connect to each other. My monthly data is spread out though (Feb, Aug, Oct, and Dec), so it doesn't connect.

Hi @Ritaf1983

 

Thank you that practically solved it!

 

Only small issue I have now is that the months are showing as integers and not as the month names (eg. feb = 2, apr = 4, etc.)

 

Thanks again

VahidDM
Super User
Super User

Hi @ArjunGrewal_ 

 

You can remove the date from the axis and use Year and Month like this link:
https://community.powerbi.com/t5/Desktop/Show-all-months-on-graph/m-p/395521

 

Or you can create a cutom column with MMM-YY format and use this in X-Axis.

 

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

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

Tried that but my data doesn't connect like I want it to because I only have 4 months of data out of the 12. I want the x-axis to atleast be Feb, Apr, Jun, Aug, Oct, Dec.

Hi @VahidDM

 

I did create a custom column with MM-YYYY format and use it in x-axis, that's my first image.

 

The first solution doesn't work unfortunately, still shows five months.

 

Thanks

Hi @ArjunGrewal_ 

 

Add that MMM-YY column as Text and sort it with oher columns, then use it in X-Axis.

 

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

Appreciate your Kudos!! 

Badges.jpg

LinkedIn | Twitter | Blog | YouTube 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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