If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
I have a date field as 'DD-MM-YYYY, hh:mm:ss'.
I need to add another column as total status duration which is nothing but total available time for a particular date.
for this I applied the function in the script as:
if(USER_NAME) = previous(USER_NAME) and DATE = previous(DATE) and STATUS <> previous(STATUS), interval(date(DATE,'hh:mm:ss')) - previous(date(DATE,'hh:mm:ss'))), as TOTAL STATUS DURATION.
But I am getting NO values under the column TOTAL STATUS DURATION
I have a straight table as follows:
USER_NAME DATE STATUS AVAILABLE OFFLINE TOTAL STATUS DURATION
A 11-JAN-2019 11:35:00 available 11:35:00 -
A 11 JAN- 2019 11:40:00 offline - 11:40:00
B 12 JAN-2019 12:30:00 available 12:30:00 -
B 12 JAN-2019 12:40:00 offline - 12:40:00
I should get the table layout as follows:
A 11-JAN-2019 11:35:00 available 11:35:00 - 00:05:00
A 11 JAN- 2019 11:40:00 offline - 11:40:00 -
B 12 JAN-2019 12:30:00 available 12:30:00 - 00:10:00
How can I implement this?
pls help me.
As per your Date format, this expression will be evaluated as failed...DATE = previous(DATE)
You need to make one more column which will be showing only date not time.