Can Looker solve my Hogwarts example?

  • 1 April 2021
  • 1 reply

This is somewhat a duplicate of my other question, but I think it’s a better way to articulate it.  If I get an answer I’ll make sure to update the other question as well.  Sorry for the dupe, I can’t edit :(


Hogwarts’ magical points system is broken, so I need to build a Looker dashboard to replace it.

Imagine the raw data to be something like: timestamp, house, points, student, reason.  (Points can of course be negative.)


I need to build a Line Chart that shows each House as a separate Series, and displays their running point totals over time.  Clicking on the line chart should preferably be able to show me the entries that occurred on that day.


Is this possible?  Can anyone help?  Thanks in advance and sorry for spam!


Best answer by humbletyler 2 April 2021, 20:47

View original

This topic has been closed for comments

1 reply

Credit to @eric_h I wanted to make sure this got an answer (even though it can’t be searched for very well because my title is silly):

measure: total_points {
type: sum
sql: ${points}

measure: running_total_points {
type: running_total
direction: "column"
sql: ${total_points}

Select the timestamp (sliced however you want), pivot by house, add the “direction” parameter, select running total points, and done!