Qlik Community

Ask a Question

New to QlikView

If you’re new to QlikView, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
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
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
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

Partner
Partner

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

Thank you very much,

Nic