Ad Widget

Collapse

Calculated Item based on Aggregate Item

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • kargh
    Junior Member
    • Feb 2014
    • 21

    #1

    Calculated Item based on Aggregate Item

    I'm trying to create a graph that shows two values. Item B is the current value, and Item C is the value from 24 hours previous. I've tried several methods but this is my current item setup:

    Item A (Aggregate Item): grpsum()
    Item B (Calculated Item): last("Item A")
    Item C (Calculated Item): last("Item B", 86400)

    I expect that Item B would be the actual value of Item A (essentially a copy), and I expect that Item C would be the value of Item B from 1 day earlier.

    What I'm getting is Item B is a copy of Item A, and Item C is a copy of Item B (either current value or previous value).

    The reason I created Item B is that time period is not supported with last, so I canno't do grpsum("Group",last,86400). Nor can I do grpsum("Group",sum,86400) since that gives me the sum of all values for the last day.

    Any suggestions?
  • glebs.ivanovskis
    Senior Member
    • Jul 2015
    • 237

    #2
    Originally posted by kargh
    Item C (Calculated Item): last("Item B", 86400)
    Shouldn't there be one more comma? Like last("Item B",,1d)? Otherwise Item B and Item C are identical.

    Comment

    • kargh
      Junior Member
      • Feb 2014
      • 21

      #3
      Originally posted by glebs.ivanovskis
      Shouldn't there be one more comma? Like last("Item B",,1d)? Otherwise Item B and Item C are identical.
      Oh heck... I didn't even realize that was possible. Thanks for the suggestion!
      Last edited by kargh; 27-06-2016, 16:29. Reason: Realized that the example exists but didn't fully understand it until now...

      Comment

      Working...