Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-14-2024, 01:39 AM
Jamal NUMAN Jamal NUMAN is offline Office 2021: How to create grouped bar chart of three columns? Windows 7 64bit Office 2021: How to create grouped bar chart of three columns? Office 2010 64bit
Expert
Office 2021: How to create grouped bar chart of three columns?
 
Join Date: Nov 2010
Posts: 525
Jamal NUMAN is on a distinguished road
Question Office 2021: How to create grouped bar chart of three columns?

Office 2021: How to create grouped bar chart of three columns?

I couldn’t figure out how to create grouped bar chart of three columns to get a chart as per the screenshot below

The data is attached





Attached Images
File Type: jpg Clip_154.jpg (184.5 KB, 21 views)
Attached Files
File Type: xlsx GWR-XGBoost_Comparison.xlsx (10.4 KB, 6 views)
__________________
Jamal NUMAN, Jamal432@gmail.com, P.O.BoX: 731, Ramallah, West Bank.
Reply With Quote
  #2  
Old 02-14-2024, 08:22 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline Office 2021: How to create grouped bar chart of three columns? Windows 10 Office 2021: How to create grouped bar chart of three columns? Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

This should set you on track
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
  #3  
Old 02-14-2024, 05:15 PM
p45cal's Avatar
p45cal p45cal is offline Office 2021: How to create grouped bar chart of three columns? Windows 10 Office 2021: How to create grouped bar chart of three columns? Office 2021
Expert
 
Join Date: Apr 2014
Posts: 871
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

In the attached there's a load of trial and error nonsense on sheets Sheet1 to Sheet5. I've left them there only in case they might be of interest.

I eventually succeeded in getting close to what you want in the sheet called Look.
On this sheet, the topmost chart is the result of simply selecting the whole of the green table and inserting a 2D column chart.
The lower chart is the same thing tweaked a bit.

2024-02-15_001327.jpg

You could rearrange the data as in the top left green table in the Look sheet manually, but it's hard work, so in fact this table is the result of a transformation by Power Query of your data on Sheet1 cells A1:C10, which I've made into a proper Excel Table called Table1 and this is what Power Query starts with. You can see the bottom right extent of the table as a little symbol in the bottom right corner of cell C10. You can drag this symbol to change the size of the table, although you'll probably not need to.
So as long as all your data is within that table, Power Query will transform it to the green table at the top left of the Look sheet. You'll need to refresh the query if you adjust the data on Sheet1 which can be done by right-clicking the green table on the Look sheet and choosing Refresh.
The source table on Sheet1 should retain its headers just as they are - the query uses them.

The final sheet, Sheet6, is the result of following (most of) the instructions in Pecoflyer's link. This is very similar but I can't easily change the colours as you'd like them, nor can I get the correct legend easily.
Attached Files
File Type: xlsx msofficeforums52067GWR-XGBoost_Comparison.xlsx (82.8 KB, 3 views)
Reply With Quote
  #4  
Old 02-15-2024, 10:29 PM
Jamal NUMAN Jamal NUMAN is offline Office 2021: How to create grouped bar chart of three columns? Windows 7 64bit Office 2021: How to create grouped bar chart of three columns? Office 2010 64bit
Expert
Office 2021: How to create grouped bar chart of three columns?
 
Join Date: Nov 2010
Posts: 525
Jamal NUMAN is on a distinguished road
Thumbs up

Quote:
Originally Posted by p45cal View Post
In the attached there's a load of trial and error nonsense on sheets Sheet1 to Sheet5. I've left them there only in case they might be of interest.

I eventually succeeded in getting close to what you want in the sheet called Look.
On this sheet, the topmost chart is the result of simply selecting the whole of the green table and inserting a 2D column chart.
The lower chart is the same thing tweaked a bit.

Attachment 20165

You could rearrange the data as in the top left green table in the Look sheet manually, but it's hard work, so in fact this table is the result of a transformation by Power Query of your data on Sheet1 cells A1:C10, which I've made into a proper Excel Table called Table1 and this is what Power Query starts with. You can see the bottom right extent of the table as a little symbol in the bottom right corner of cell C10. You can drag this symbol to change the size of the table, although you'll probably not need to.
So as long as all your data is within that table, Power Query will transform it to the green table at the top left of the Look sheet. You'll need to refresh the query if you adjust the data on Sheet1 which can be done by right-clicking the green table on the Look sheet and choosing Refresh.
The source table on Sheet1 should retain its headers just as they are - the query uses them.

The final sheet, Sheet6, is the result of following (most of) the instructions in Pecoflyer's link. This is very similar but I can't easily change the colours as you'd like them, nor can I get the correct legend easily.





Thank you guys for the help. I got an advice just rearrange the structure of the data in order to get the chart output i need as per the following screenshots:
Attached Images
File Type: jpg Clip_798.jpg (169.5 KB, 13 views)
File Type: jpg Clip_799.jpg (137.7 KB, 12 views)
File Type: jpg Clip_800.jpg (142.3 KB, 12 views)
__________________
Jamal NUMAN, Jamal432@gmail.com, P.O.BoX: 731, Ramallah, West Bank.
Reply With Quote
  #5  
Old 02-15-2024, 10:30 PM
Jamal NUMAN Jamal NUMAN is offline Office 2021: How to create grouped bar chart of three columns? Windows 7 64bit Office 2021: How to create grouped bar chart of three columns? Office 2010 64bit
Expert
Office 2021: How to create grouped bar chart of three columns?
 
Join Date: Nov 2010
Posts: 525
Jamal NUMAN is on a distinguished road
Thumbs up

screenshot cont.
Attached Images
File Type: jpg Clip_801.jpg (243.9 KB, 12 views)
File Type: jpg Clip_802.jpg (237.2 KB, 12 views)
__________________
Jamal NUMAN, Jamal432@gmail.com, P.O.BoX: 731, Ramallah, West Bank.
Reply With Quote
  #6  
Old 02-16-2024, 04:33 AM
p45cal's Avatar
p45cal p45cal is offline Office 2021: How to create grouped bar chart of three columns? Windows 10 Office 2021: How to create grouped bar chart of three columns? Office 2021
Expert
 
Join Date: Apr 2014
Posts: 871
p45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond reputep45cal has a reputation beyond repute
Default

Quote:
Originally Posted by Jamal NUMAN View Post
I got an advice just rearrange the structure of the data in order to get the chart output i need as per the following screenshots:

Well…
1. That's not what you asked for.
2. I did mention that rearranging the data could be hard work, but more than that, it has to be done correctly. You have managed to reverse the values for XGBoost Ye and Fan:



2024-02-16_112714.jpg


Consequently this is wrong:


2024-02-16_112820.jpg


It's better to do that sort of transformation automatically, especially if there's more data to rearrange.
Reply With Quote
  #7  
Old 02-16-2024, 11:20 AM
Jamal NUMAN Jamal NUMAN is offline Office 2021: How to create grouped bar chart of three columns? Windows 7 64bit Office 2021: How to create grouped bar chart of three columns? Office 2010 64bit
Expert
Office 2021: How to create grouped bar chart of three columns?
 
Join Date: Nov 2010
Posts: 525
Jamal NUMAN is on a distinguished road
Thumbs up

Thank you very much p45cal for the prompt help. This is very useful. I have adapted my chart based on your correction





Attached Images
File Type: jpg Clip_811.jpg (150.5 KB, 11 views)
File Type: jpg Clip_812.jpg (217.1 KB, 12 views)
File Type: jpg Clip_813.jpg (214.4 KB, 12 views)
__________________
Jamal NUMAN, Jamal432@gmail.com, P.O.BoX: 731, Ramallah, West Bank.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to disconnect Onedrive from Office 2021 Randall49 Office 0 04-07-2023 09:08 AM
Office 2021: How to create grouped bar chart of three columns? How to create 3 Columns from Data in 1 Column using every 3 Cells to create the 3 Columns? leeuniverse Excel 2 03-30-2023 11:00 PM
Transition from Office 365 to Office Pro 2021 PHearn Outlook 0 06-08-2022 07:01 PM
Can't can't install new office professional plus 2021 ottiliegirl Office 4 05-31-2022 03:14 PM
Office 2021 for Mac NeilC Office 3 10-14-2021 01:50 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:09 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft