Sunday 9 November 2014

Energy dashboard again - more on year to date

Getting to grips with how to partition:

  1. Calculating a reference ID for each year such as Div(datediff('week',[BaseDate],[Date]),52) 
  2. which can easily be converted to a readable label: STR(9+[YrID])+"/"+Str(10+[YrID])
  3. and using first() to pull out the first value in the partition (or more accurately lookup(max([gas]),first()).


That's just what's needed for the energy data, which I choose to start counting from mid September ([BaseDate]), and where they are meter readings, so I need to keep taking differences to get meaningful values.


No comments:

Post a Comment