Excel 2016 - Box and Whiskers

Dear all,

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.

Thanks.

Famey

Answer
Answer

Hello again.

You need to transform your data into two columns. This may sound daunting, but with Excel 2016 it's actually quite easy.

  1. Select any cell in your data table and click Insert > Table. Make sure that the box "My table has headers" is ticked.
  2. Now the data will be formatted as a table, with the month names as the table headers. 
  3. Click the Data ribbon and in the "Get & Transform" group click the command "From Table"
  4. This will open the Query Editor window with your table loaded as query data. 
  5. In the Query Editor click the "Add Column" tab and then the "Add Custom Column" command.

  6. In the window that pops up, type a 1 into the formula box after the = sign,  like in this screenshot:
  7.  Breathe. All is good.
  8. 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.
  9. With that Custom column still selected, click the Transform ribbon tab, then the Unpivot Columns dropdown and select Unpivot Other Columns

  10. 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. 
  11. Select the Custom column and right-click, then remove it. Then click the Home ribbon and click Close & Load
  12. This will load the transformed data to a new sheet in your workbook.
  13. Select the new data table and create a Box and Whisker chart.
  14. 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.

How satisfied are you with this reply?

Thanks for your feedback.

 
 

Question Info


Last updated October 26, 2022 Views 18,007 Applies to: