Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
abhaysingh
Specialist II
Specialist II

Logic Help

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..


23 Replies
swuehl
MVP
MVP

Hm, seems to work for me, can you detail what is not working as expected?

abhaysingh
Specialist II
Specialist II
Author

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

swuehl
MVP
MVP

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
2707512.09.14 13:26:021
2707512.09.14 13:31:021
2707512.09.14 13:36:021
2707512.09.14 13:41:021
2707513.09.14 01:46:021
2707514.09.14 15:56:021
2707515.09.14 17:06:021
2707516.09.14 08:31:021
2707518.09.14 10:51:021
2707518.09.14 14:06:031
2707519.09.14 15:16:021
2707521.09.14 17:36:021
2707521.09.14 20:51:021
2707522.09.14 18:46:021
2707523.09.14 23:11:021
2707525.09.14 00:21:021
2707515.10.14 22:01:021
2707517.10.14 02:26:021
2707518.10.14 00:21:021
2707519.10.14 01:31:021
27075 1
abhaysingh
Specialist II
Specialist II
Author

Yeah, Swuehl, My mistake.. i got your point..

Thanks for Support....

Abhay