Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to show last 5 transaction dates

Hi All

How to show last 5 transaction details in QV Report

  Transaction

3/21/2016 1:01
3/21/2016 0:55
3/21/2016 0:21
3/21/2016 0:19
3/21/2016 0:07
3/20/2016 23:37
3/20/2016 22:55
3/20/2016 22:47
3/20/2016 22:46
3/20/2016 22:34

Thanks

Nagesh

4 Replies
rahulpawarb
Specialist III
Specialist III

Hello Nagesh,

Hope you are doing well!

Please refer given draft version of script:

TranData:

LOAD Timestamp#(TransactionDate, 'MM/DD/YYYY hh:mm') AS TransactionDate;

LOAD * INLINE [

TransactionDate

3/20/2016 23:37

3/20/2016 22:55

3/21/2016 1:01

3/21/2016 0:55

3/21/2016 0:21

3/20/2016 22:47

3/20/2016 22:46

3/20/2016 22:34

3/21/2016 0:19

3/21/2016 0:07

];

FinalTranData:

LOAD *,

     RowNo() AS RowNo

Resident TranData

Where RowNo() < 5

Order By TransactionDate desc;

DROP Table TranData;

DROP Field RowNo;

Also refer the attached sample application.

Regards!

Rahul

Anil_Babu_Samineni

When you talk about QV Report you may try with

FirstSortedValue(TransactionDate, Aggr(Sum(Sales), TransactionDate))

Or

in script, may be simple

Load TimeStamp, Rowno() as ID where ID <= 5 Group By TimeStamp;

Load * From Timestamp;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anonymous
Not applicable
Author

Hi Rahul and Anil Babu

Expecting same but like below

Based on TRANSACTION_DATE. we will give option user  to enter  number through input box  (default it to 10). Example if a user enter 10, chart should display last 10 records based on TRANSACTION_DATE (last 10 transaction dates also)

Note : The TRANSACTION_DATE having TImeStamp like 3/22/2017 3:02:13 AM,3/22/2017 5:50:13 AM,3/22/2017 1:02:20 PM

Thanks ,

Nagesh

rahulpawarb
Specialist III
Specialist III

Hello Nagesh,

Thank you for your inputs.

I have further modified the existing application to filter the data based on variable values using Input box as well as slider objects. Please refer the attached sample application.

References:

Selecting Arbitrary Date Ranges - YouTube

Regards!

Rahul