I have day by day data. I would like to display a line chart with this daily data as well as weekly average bar chart.
How can I display daily as well as weekly trend chart by only having daily data in my spreadsheet?
From your spreadsheet, select the cells with data you'd like to include in the chart. Alternatively, you can select a range or multiple ranges of data from within the charts dialog. You can do so by clicking Select range... and entering one or more ranges by clicking Add another range.
Note: It helps to label the data in your spreadsheet before creating a chart. For example, if you want to chart your expenses, you might have a row of numbers labeled 'Rent' and another labeled 'Groceries.' Then you might label columns by month or week, etc. These labels will appear automatically in the window where you create and preview your chart, as long as the labels are the first row and column of your selected range of cells.
Select the Chart icon in the menu bar or choose Insert > Chart. The charts dialog box appears. In the Start tab, you’re able to edit the range of cells to be included in your chart, select basic layout settings, and view recommended charts.
In the Start tab, you’re able to edit the range of cells to be included in your chart, select basic layout settings, and view recommended charts.
Note: If you included labels for your data in your spreadsheet, you can specify that you want to use the first row and first column of your data as labels by checking the box next to ‘Use 1st row as headers’ and ‘Use 1st column as labels.’ These settings are automatically selected when you include labels in Row 1 and Column A in your spreadsheet.
If you decide that one of the recommended charts isn’t the right thing for your data or if you want to see more chart options, you can either click More >> or move on to the Charts tab.
From the Creating a chart help page.
For the average, you can use the formula
=ArrayFormula(AVERAGE(IF(A1:A7 <> 0; A1:A7))). To use this formula within the chart instead of its value, I don't know how to do it or even if it's possible. You could, however, add another cell (say
A8) in which you compute the average value for the respective week and use that value to make you average values chart.
That will give you the average for every day, and the weekly average is the figure in cell B9.
You can repeat the above every 7 days to give you the weekly average. (If you don't have a spare column you can select column A (click at the top) and then, from the Insert menu, insert a column to the right.)
If you don't want the daily average you can just use the formula from cell B9 to show the weekly average.