Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
nicalbert
Partner
Partner

Using a timestamp is set analysis

Hello everyone,

I have been using this set analysis to show some KPIs for "yesterday" (i.e. today - 1), and it works really well:

=count({<ReceivedTimeStamp = {'>=$(=DayStart(today()-(1))))<$(=DayStart(today()))'},
Code = {1,2,3,4}>}
DISTINCT RunID)

I now need to modify it to show the same KPIs, but for a time period that goes from yesterday at 0700 to today at 0659. It's still a 24hrs period, but covering 2 days.

I'm totally lost with this one!!! Can anyone provide some guidance on how to achieve that? Or if this can be achieved at all...

Thanks!

Nic

1 Solution

Accepted Solutions
Kush
MVP
MVP

Assuming your time field is in proper timestamp format then you can try below. You can adjust the hours and minutes in maketime function within set.

Note: Maketime function always takes parameters as 24 hours format. So 3 PM can be written as maketime(15,00)

=count({<ReceivedTimeStamp = {">=$(=timestamp(floor(Today()-1)+maketime(07,00)))<=$(=timestamp(floor(Today())+maketime(06,59)))"},
Code = {1,2,3,4}>}
DISTINCT RunID)

View solution in original post

2 Replies
Kush
MVP
MVP

Assuming your time field is in proper timestamp format then you can try below. You can adjust the hours and minutes in maketime function within set.

Note: Maketime function always takes parameters as 24 hours format. So 3 PM can be written as maketime(15,00)

=count({<ReceivedTimeStamp = {">=$(=timestamp(floor(Today()-1)+maketime(07,00)))<=$(=timestamp(floor(Today())+maketime(06,59)))"},
Code = {1,2,3,4}>}
DISTINCT RunID)

View solution in original post

nicalbert
Partner
Partner
Author

you totally made my day here! Your solution is exactly what I was looking for. 

Thank you very much,

Nic