| Author |
Message |
AnnesCrystal
Newbie
Joined: 22 Apr 2014
Online Status: Offline
Posts: 1
|

Topic: Using Variables? Posted: 22 Apr 2014 at 9:40am |
|
Hello!
I hope that someone can help me solve this tricky question:
I have an electrician counter. Every hour, every day the counter data are logged.
Year Month Day Hour Counter
2014 1 31 8 pm 6.857.660,00
2014 1 31 9 pm 6.857.820,00
2014 1 31 10 pm 6.857.970,00
2014 1 31 11 pm 6.858.110,00
2014 1 31 12 pm 6.858.270,00
By subtracting the counter data at 11 pm from the counter data at 12 pm you get the electricity produced the last hour.
I want to calculate the electricity produced every month.
I tried to use Variable in my formula to seek out the counter data at 12 pm the last day in the month, but I can´t seem to make it work.
/Anne
|
IP Logged |
|
|
|
kostya1122
Senior Member
Joined: 13 Jun 2011
Online Status: Offline
Posts: 475
|

Posted: 22 Apr 2014 at 12:24pm |
|
you could do in select expert day = day(dateserial(year(currentdate),month(currentdate)+1,1-1)) hour in ("11 pm","12 pm") then a formula minimum(counter) - maximum(counter)
assuming that counter at 12 pm always higher
|
IP Logged |
|
hello
Groupie
Joined: 05 Feb 2014
Online Status: Offline
Posts: 85
|

Posted: 23 Apr 2014 at 9:32am |
|
dateserial
the most useful CR function of them all (JMO).
|
IP Logged |
|
|
|