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

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

Reply
Anonymous
Not applicable

How to Pivot or restructure data to create simple bar chart

Hi All, 

I have data in below format and I am struggling to create a simple bar chart where I can have month,Year on X axis and Region or Business unit on Y axis.  Any ideas on how I can restructure the data in Power BI.  I have month as columns and year on rows.

Capture.JPG

 

1 ACCEPTED SOLUTION

HI @Anonymous

 

One way would be to make two copies of this table in Power Query.  Filter the first where the attribute column contains the text "-Qty" and filter the other where the attribute column contains the text "-Revenue".

 

Then you can merge the tables (horizontally) using a full outer join and match on the first three columns.  This should give you something pretty close to what you need. 🙂

 

Power Query is pretty powerful


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

3 REPLIES 3
Phil_Seamark
Microsoft Employee
Microsoft Employee

HI @Anonymous

 

Go into the Power Query Editor, select your first three columns in the preview grid and then hit the "Unpivot other columns" button.

 

This should pivot your month column data around onto rows where it will be much easier to work within your charts

 

image.png


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Anonymous
Not applicable

@Phil_Seamark Thats great. thank you. But I have one other issue here. In the below image, other than qunatity as attribute, I have other facts like revenue which is where having chanllenge on reporting on quantity , revenue separately. Highly Appreciate your help! ThanksCapture.JPG

 

HI @Anonymous

 

One way would be to make two copies of this table in Power Query.  Filter the first where the attribute column contains the text "-Qty" and filter the other where the attribute column contains the text "-Revenue".

 

Then you can merge the tables (horizontally) using a full outer join and match on the first three columns.  This should give you something pretty close to what you need. 🙂

 

Power Query is pretty powerful


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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