Forum Discussion
Line chart
Hi, Taking this table as an input, how to create a similar line chart and also a bar chart in Excel.if you could let me know the process that would be great as I can also learn from that.Thanks in Advance
| Block Size | %Hit Ratio | Cache size |
| 2 | 64.61 | 8 |
| 4 | 62.36 | 8 |
| 8 | 48.88 | 8 |
| 2 | 72.47 | 16 |
| 4 | 79.78 | 16 |
| 8 | 76.4 | 16 |
| 16 | 79.78 | 16 |
| 2 | 76.4 | 32 |
| 4 | 85.96 | 32 |
| 8 | 90.45 | 32 |
| 16 | 93.82 | 32 |
| 32 | 96.07 | 32 |
2 Replies
- PeterBartholomew1Silver Contributor
One way or another I think you need to pivot your data.
This can be done with a Pivot Chart / Table or a formula. The formula shown top-right is
= SUMIFS(Hit_Ratio, Block_Size, block, Cache_size, cache )but fairly soon a function PIVOTBY should be coming out.
Since you want the different cache sizes to be separate chart series, you need to layout the data differently, with a column for each cache size:
You can then create a line chart and bar chart (or column chart) from this range.
By default, Excel will treat Block Size as a series. To correct that, click on the chart, then click Select Data on the Chart Design tab of the ribbon.
Select Block Size, then click Edit.
Select the Series values range, and copy it (Ctrl+C).
Click Cancel, then click Remove.
Next, click Edit under Horizontal (Category) Axis Labels.
Clear the box, then paste (Ctrl+V).
Click OK to confirm.
See the attached demo.
Click OK, then select