Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Let me modify my question
I have username , timestamp
satyaban , 20-Jan-2018 12:30:45
satyaban , 21-Jan-2019 12:45:20
Satyaban , 12-07-2020 10:45:25
Raghu , 08-08-2016 09:30:23
Basically I want to show this data in Table Chart in Qlik sense in below format i.t each user and its latest timestamp value
username , timestamp
Satyaban , 12-07-2020 10:45:25
Raghu , 08-08-2016 09:30:23
I have tried by taking username as dimension and below script in Measure of table chart
Max(Date(Floor(Timestamp#(timestamp,'DD-MMM-YYYY hh:mm:ss')),'DD-MMM-YYYY'))
which gives results only max date not actual fully timestamp value as below . But I need same max timestamp value in timestamp column .
Script results (Only shows date value😌😞
username , timestamp
Satyaban , 12-07-2020
Raghu , 08-08-2016
Kindly suggest how to achieve same what should I write in measure section i.t modify the above script
I propose the following solution:
first the loading script will become:
Data:
load
alt( Timestamp#( timestamp , 'DD-MMM-YYYY hh:mm:ss' ),Timestamp#( timestamp , 'DD-MM-YYYY hh:mm:ss' )) as New_timestamp,* inline [
username , timestamp
Satyaban,20-Jan-2018 12:30:45
Satyaban,21-Jan-2019 12:45:20
Satyaban,12-07-2020 10:45:25
Raghu ,08-08-2016 09:30:23
];
we add alt() to harmonize the dates
and in the graph you use the expression:
=Timestamp(Max(New_timestamp),'DD-MM-YYYY hh:mm:ss')
And there it is.
Hi Toufiq,
Thanks for awesome reply and its worked I am going to mark it solution but i had a small doubt
all timestamp fields did not sort either in ascending/descending order .
Even in table chart graph for Measure field only sort by numeric /sort by alphabatically available whidh donot work well as
How to sort timestamp field of table chart in ascending/descending
Hi,
if you can provide a sample , that'd be great.
otherwise you can add a field like this in the script:
alt( Timestamp#( timestamp , 'DD-MMM-YYYYY hh:mm:ss' ),Timestamp#( timestamp , 'DD-MMM-YYYYY hh:mm:ss' ))-Makedate(1900,01,01) as IDRank,
then Sort by expression ->=IDrank