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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
kman42
Frequent Visitor

Adding column legend to line and stacked column graph collapses the x axis

I am trying to configure a line and stacked column graph. I want it to look like the following, but the columns consist of multiple items that I need to identify by color/legend:

 

Screenshot 2024-10-16 at 11.20.06 AM.png

 

 

 

 

 

 

 

 

 

The columns represent distinct events that happen periodically. In the above image, they are represented in the correct month, but the columns are not showing the stacked values (the one indicated for April is because I selected that one in an associated table and the darker color for July is due to a formatting formula). If I add a field to the column legend, it correctly identifies the column components but it collapses the x-axis to only include the months with column data. Like this:

 

Screenshot 2024-10-16 at 11.19.55 AM.png

 

 

 

 

 

 

 

 

 

Basically, I want the first graph, but want the bars color coded like the second. I assume this has something to do with trying to combine a continuous line graph with discrete columns, but I don't know how to fix it. 

 

Thanks!

2 REPLIES 2
Anonymous
Not applicable

Hi @kman42 ,

 

Why do you use conditional formatting in the first picture? I think the easiest way to make different events appear in different colors is to put the event in the legend field. Please tell me if I missed anything. It will be better to provide a pbix file(does not contain sensitive data) or a demo file.

 

 

Best regards,

Mengmeng Li

 

 

 

lbendlin
Super User
Super User

Not something you can do with the standard visuals.  Consider using Deneb for that, and make sure your users understand what they are looking at.

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.

Top Solution Authors