Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hey Guys,
Need One Help
I have one date field which containing the date with TimeStamp and its get Upated every seconds in Transaction Table.
I have a report in which Date field is there
i.e Asset | Sensor | DateRecorded | Value
A | 123 | 24-09-2015 12:00:01 AM | 12344
A | 123 | 24-09-2015 12:00:02 AM | 12345
A | 123 | 24-09-2015 12:00:03 AM | 12346
.
..so on
..
A | 123 | 24-09-2015 12:00:30 AM | 12347
A | 123 | 24-09-2015 01:00:01 AM | 12348
and so on
updated in transaction Table
I want to Create a Interval like 10 min, 30 min, 1 hour, 2 hour etc
Now i want when i select any Interval Suppose 10 Min, the Report Should Display like Below
Asset | Sensor | DateRecorded | Value
A | 123 | 24-09-2015 12:00:01 AM | 12344
A | 123 | 24-09-2015 12:00:11 AM | 12345
A | 123 | 24-09-2015 12:00:21 AM | 12346
A | 123 | 24-09-2015 12:00:31 AM | 12347
and so on
and Same if i select 30 Min the report should update like below
Asset | Sensor | DateRecorded | Value
A | 123 | 24-09-2015 12:00:01 AM | 12344
A | 123 | 24-09-2015 12:00:31 AM | 12345
A | 123 | 24-09-2015 01:00:01 AM | 12346
A | 123 | 24-09-2015 01:00:31 AM | 12348
DateRecorded Field i am getting in Transaction Table
TxnTable:
Load
Field1,
Field2,
DateRecorded
from Source;
Please Suggest how i can achieve it..
Hm, seems to work for me, can you detail what is not working as expected?
Hi Swuehl,
Actually Sorting in Ascending order seems fine w.r.t Date but Sorting Should come Perfect w.r.t Time as well.
Output Required in below format
i.e. 22-09-15 00:00:05 AM
22-09-15 00:00:10 AM
22-09-15 00:00:15 AM
22-09-15 01:00:00 AM
22-09-15 01:00:10 AM
22-09-15 01:00:15 AM
22-09-15 02:00:00 AM
22-09-15 02:00:10 AM
22-09-15 02:00:15 AM
but right now the output is sorted as per date only..
Any Suggestion?
THANKS
Abhay
That's not what I see at my side, or maybe I don't understand your issue, here is a chart copy. It's sorted by date and time asc, isn't it?
AssetInstanceId | HandheldDeviceAccessoryId | =If( Mod(Minute(RelativeTimeStamp), Interval) = 0 and Second(RelativeTimeStamp)=0, Date) | 1 |
---|---|---|---|
1 | |||
270 | 75 | 12.09.14 13:26:02 | 1 |
270 | 75 | 12.09.14 13:31:02 | 1 |
270 | 75 | 12.09.14 13:36:02 | 1 |
270 | 75 | 12.09.14 13:41:02 | 1 |
270 | 75 | 13.09.14 01:46:02 | 1 |
270 | 75 | 14.09.14 15:56:02 | 1 |
270 | 75 | 15.09.14 17:06:02 | 1 |
270 | 75 | 16.09.14 08:31:02 | 1 |
270 | 75 | 18.09.14 10:51:02 | 1 |
270 | 75 | 18.09.14 14:06:03 | 1 |
270 | 75 | 19.09.14 15:16:02 | 1 |
270 | 75 | 21.09.14 17:36:02 | 1 |
270 | 75 | 21.09.14 20:51:02 | 1 |
270 | 75 | 22.09.14 18:46:02 | 1 |
270 | 75 | 23.09.14 23:11:02 | 1 |
270 | 75 | 25.09.14 00:21:02 | 1 |
270 | 75 | 15.10.14 22:01:02 | 1 |
270 | 75 | 17.10.14 02:26:02 | 1 |
270 | 75 | 18.10.14 00:21:02 | 1 |
270 | 75 | 19.10.14 01:31:02 | 1 |
270 | 75 | 1 |
Yeah, Swuehl, My mistake.. i got your point..
Thanks for Support....
Abhay