Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How We can take last 48 hours data in dashboard?
How can we do it in Script?
Load
date(txn_time,'DD-MM-YYYY') as "Date",
timestamp(txn_time,'DD-MM-YYYY hh:mm:ss') as "Timestamp",
"txn_time"
FROM [lib://QVD/Data.QVD]
(qvd);
Can i do it on Dashboard?
suppose i have pie chart and Expression is:
Count({$<param_name={'TEMP'},param_value={'<=-20'},loc_subtype-={'2'},branch_type={'FACTORY'}>}param_value)/
Count({$<param_name={'TEMP'},branch_type={'FACTORY'},loc_subtype-={'2'}>}param_value)
can we do directly in this expression around "txn_time" ? how?
Try this may be:
Load
date(txn_time,'DD-MM-YYYY') as "Date",
timestamp(txn_time,'DD-MM-YYYY hh:mm:ss') as "Timestamp",
"txn_time"
FROM [lib://QVD/Data.QVD]
(qvd)
Where TimeStamp(txn_time,'DD-MM-YYYY hh:mm:ss') >= Timestamp(Now() - 2, 'DD-MM-YYYY hh:mm:ss');
Try this may be:
Load
date(txn_time,'DD-MM-YYYY') as "Date",
timestamp(txn_time,'DD-MM-YYYY hh:mm:ss') as "Timestamp",
"txn_time"
FROM [lib://QVD/Data.QVD]
(qvd)
Where TimeStamp(txn_time,'DD-MM-YYYY hh:mm:ss') >= Timestamp(Now() - 2, 'DD-MM-YYYY hh:mm:ss');
May be this in your set analysis for the expression:
{<Timestamp = {"$(='>=' & TimeStamp(Max(Timestamp) - 2, 'DD-MM-YYYY hh:mm:ss') & '<=' & TimeStamp(Max(Timestamp), 'DD-MM-YYYY hh:mm:ss'))"}>}
Load
date(txn_time,'DD-MM-YYYY') as "Date",
timestamp(txn_time,'DD-MM-YYYY hh:mm:ss') as "Timestamp",
"txn_time"
FROM [lib://QVD/Data.QVD] (qvd)
where
Timestamp#(Timestamp, 'DD-MM-YYYY hh:mm:ss') <= now()
and
Timestamp#(Timestamp, 'DD-MM-YYYY hh:mm:ss') >= (now()-2)
;
Hi Please use the below script:
Thank You.
Data:
Load
date(txn_time,'DD-MM-YYYY') as Date,
timestamp(txn_time,'DD-MM-YYYY hh:mm:ss') as Timestamp,
txn_time
FROM [lib://QVD/Data.QVD] (qvd)
where
Timestamp#(Timestamp, 'DD-MM-YYYY hh:mm:ss') <= now() and Timestamp#(Timestamp, 'DD-MM-YYYY hh:mm:ss') >= (now()-2) ;