Line Chart, Average instead of Sum

Can I make it so that the line chart does an average across all rows instead of a sum?

Below is the graph that I would like to show. However, I want the user to be able to download the data directly from this chart that includes a deeper breakdown of the red and orange averages here.

Here is the SQL I use to create the above chart.

  When I uncomment warehouse name, I get the below chart. Notice how the hours are now in the thousands. This is because it is summing all of the averages instead of averaging the averages. How can I average the averages in the visualization while still keeping the level of detail in the csv download? I do not want to create a second table that the user has to look into to see the extra detail.

  

Any help is appreciated!

1reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like1 Follow
  • 1 Likes
  • 4 mths agoLast active
  • 1Replies
  • 22Views
  • 2 Following