0

Rollup calculation syntax

I'm trying to create a rollup calculation but I don't really understand he syntax and I can't find any examples.

I have a virtual view with these asset types:

one Company, with multiple Sites, each of which has multiple Units, each of which has multiple Items, each of which has a Temperature tag (among others)

I want each Unit to hold the average, max and min Temperature on all the Items below it (I then want to roll those up to the Site). I've got this:

 

I suspect the Source Path is wrong but I don't know. Can anyone advise?

3 replies

null
    • smason
    • 2 wk ago
    • Reported - view

    Hi ,

    Your suspicions are correct. For the first parameter in the Rollup function you will want to use 'CSV Hierarchy.My Company.Site00.%Asset%' based upon your Asset Path. See if that works for you.

      • alistair_frith
      • 12 days ago
      • Reported - view

       Perfect, thanks. That fixed it. In fact, what I should have done was remove Site00 from the asset path, since I want it applied to all units at all sites.

    • smason
    • 2 wk ago
    • Reported - view

    If you want, you can download the JSON file from this article which has examples of all of the available Canary functions then import them from the Calc & Events status screen. https://helpcenter.canarylabs.com/t/x2y8gla/available-functions-of-the-calculation-server-version-24

Content aside

print this pagePrint this page
  • Status Answered
  • 12 days agoLast active
  • 3Replies
  • 15Views
  • 3 Following