Slicing and dicing visualizations using hierarchy nodes
We spent some time in the last chapter looking at hierarchy nodes and the use of the OVER function. We're now going to look at the use of the OVER function in custom expressions, where it becomes a more dynamic tool. There are also some additional syntax options.
To recap, a familiar hierarchy is implicit in every date, which we can break down into nodes, the most basic set of nodes being Year>Month>Day. The OVER methods allow us to reference nodes across the normal row structure of the data, such as comparing a value for 03-Feb-2013 with 03-Feb-2012, as shown in the following figure:
Also, just to remind you, the OVER function can always be used without an explicit method to simply aggregate a value over some hierarchical quality in the data, and you don't have to formally define the hierarchy in this case. An example in the baseball data would be AVG([Runs]) OVER [Team]
.
You can use OVER methods in a custom expression just as we...