Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a data set (~2000 rows) with the following form:

+---------------------+-----+-----+-----+-----+-----+
| Datetime            | n1  | n2  | n3  | n4  | tot |
+---------------------+-----+-----+-----+-----+-----+
| 2008-08-02 12:25:00 | 20  | 5   | 2   | 3   | 30  |
+---------------------+-----+-----+-----+-----+-----+

I'd like to graph this data using a Stacked Area chart in Excel 2003. Where I'm having difficulty is I'd like to present the chart on a scale of each hour. Could someone please provide the steps for producing a Stacked Area chart using time scale?

share|improve this question

migrated from stackoverflow.com Nov 1 '10 at 12:38

This question came from our site for professional and enthusiast programmers.

add comment

2 Answers

Here are the steps you need to follow. I'm using a Pivot Chart, as suggested by Longhorn213. While you have the table selected:

  1. Select Data -> PivotTable and PivotChart Report ...
  2. Select the Radio Button for PivotChart report (with PivotTable report)
  3. Hit the Finish button You should now have two new tabs in the spreadsheet. One will have an empty chart and the other will have an empty pivot table. Select the sheet with the empty pivot table. Then:

  4. Drag the Date field from the Pivot Table Field List to the area in the pivot table marked Drop Row Fields Here You should now see EVERY time stamp listed in the row.

  5. Right click on the Date header in the Row and select Group and Show Detail -> Group

  6. Highlight that you want to group by Hours and then hit the OK button Note that if your data spans several days/months, you MUST select both Days and Months in addition to Hours to further order the data.

  7. Drag the n1 field into the area marked Drop Data Items Here

  8. Drag the n2 field over top of the n1 data and drop it This will cause a new row header called Data to appear beside the Date header.

  9. Drag the new Data header to the area marked Total and drop it there You now have the basic structure of the table that you want.

  10. Drag the n3 and n4 fields into the data area, completing the table you want Now you can switch back over to the new chart sheet that was created. You should see the default type of chart with all your data.

  11. Right click on the Chart Area and select Chart Type...

  12. Select the type of chart you want

And we're done! I'll check back later and clarify anything you need.

share|improve this answer
add comment

You can use Pivot Tables for it.

With Pivot Tables you have the data in one tab and then create a pivot table and summarize them by time. I would refer to the Help with Excel for more on Pivot Tables.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.