Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
I want to write a set analysis expression i have
Date
Hours
TotalGallons
For example Date (04/15/204 , hours from 6 to 24 and Date 04/16/2014 hours 1 to 6)
when i select the max date it should do this calculation:
example
4/15/14 6:00 AM |
4/16/14 600 AM |
sum({<TagName = {'FM_MB_Total'},Date={'$(vMaxDate)'}>}TotalGallons)
this expression gives the readings for max date from 1 to 24 hours i want to calculate from between current and previous date 6 am to 6 am
Thanks'
see attachment; I generate some test data using a datetime field (datetime in below expression)
My expression is (I suppose you should adapt to your requirement adding TagName and changing date and time format at the beginning of the script)
=Sum ({$<datetime={">=$(=Date(Max(date)-1 +0.25,'DD/MM/YYYY hh:mm:ss'))<=$(=Date(Max(date) + 0.25,'DD/MM/YYYY hh:mm:ss'))"}>} TotalGallons)