My problem:- I want the horizontal axis to be labeled as Jan, Feb etc according to the box, but the label become my
legend in this graph. How do I solve this.
You need to transform your data into two columns. This may sound daunting, but with Excel 2016 it's actually quite easy.
Select any cell in your data table and click Insert > Table. Make sure that the box "My table has headers" is ticked.
Now the data will be formatted as a table, with the month names as the table headers.
Click the Data ribbon and in the "Get & Transform" group click the command "From Table"
This will open the Query Editor window with your table loaded as query data.
In the Query Editor click the "Add Column" tab and then the "Add Custom Column" command.
In the window that pops up, type a 1 into the formula box after the = sign, like in this screenshot:
Breathe. All is good.
Now there is a new column in the Query Editor window and it is highlighted. If not, double click any of the 1 values in the column to select the column.
With that Custom column still selected, click the Transform
ribbon tab, then the Unpivot Columns dropdown and select
Unpivot Other Columns
You'll now see something like this: The Custom column is the first column, the next column has the month names and the Value column has the different values for each month.
Select the Custom column and right-click, then remove it. Then click the Home ribbon and click
Close & Load
This will load the transformed data to a new sheet in your workbook.
Select the new data table and create a Box and Whisker chart.
Congratulations. You have just used "Get and Transform", aka "Power Query" to whip data into the shape you need for your chart.
You can download the file I used to create the screenshots here:
BoxWhiskerTransform
If you get stuck re-creating the scenario, please pipe up.
___________________ cheers, teylyn
Community Moderator www.teylyn.com
97 people found this reply helpful
·
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps us improve the site.