# New to QlikView

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

Announcements
cancel
Showing results for
Did you mean:
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:

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

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)``````
2 Replies
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)``````
Partner

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

Thank you very much,

Nic