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
MrBIn
Frequent Visitor

Creating a simple bar chart with multiple columns on the x-axis

I have a table which is looking something like this:

 

DescriptionBegin Date2021202220232024
Project 113.06.2021400.000€450.000€450.000€

0€

Project 201.01.20220€300.000€200.000€

200.000€

 

Based on this table, I want to have a similar chart to the one I was able to put together in Excel in seconds, looking like this:

Excel.png --> For every year column, the values from the different rows should be summed up.

 

 

 

 

 

 

 

 

 

However, the best I can do in Power BI is this, using a grouped column chart (ignore the values, the sums are correct):

power bi.png

 

As you can see, the different columns are "sticking" together and there is no separation by years compared to the excel example.

This is how I set it up:

setup.png

I also played around a bit and put the different column fields into "axis" for example, but this didn't work.

 

Am I missing something? How am I able to achieve this, in my opinion relatively simple chart, using Power BI?

 

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @MrBIn ,

 

This is not the best format for the data you need to go to the query editor select the columns of the years and then Unpivot columns

 

https://www.youtube.com/watch?v=GINbx-gOwNE

 

Now you just need to use the year on the legend.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

2 REPLIES 2
MFelix
Super User
Super User

Hi @MrBIn ,

 

This is not the best format for the data you need to go to the query editor select the columns of the years and then Unpivot columns

 

https://www.youtube.com/watch?v=GINbx-gOwNE

 

Now you just need to use the year on the legend.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



MrBIn
Frequent Visitor

Thank you very much, this worked to solve my problem!

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.