Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Romainscho1
Contributor III
Contributor III

How can I create a measure in order to filter on a specific time range

Hi Community,

Hopefully, someone can help me out:

I am using measures in order to show specific data: september 2020, october 2020,etc which is working fine.

I wanted to create measures for time ranges, but there are too many in order to proceed like I am used to:

Date: September 2020 - September 2021 in the first column / Departure time: 73.000 different entries!

Romainscho1_0-1631710358617.png 

Is there a formula which allows me to filter on specific departure hours like Timestamp range between 07:00:00 - 09:00:00

so I can see all data within this timeframe?

(I wanna avoid to recalculate everything in seconds, because it messes up with time slots above 24 hours)

Thank you very much,

1 Reply
rubenmarin

Hi, if you add and hour field you can easily use set analysis to filter data like: Sum({<Hour={">=7<9"}>} Value).

If it's a dimension you can set If(Hour>=7 and Hour<9, DepartureTime)

You can set variable to the min and max hour to show: Hour={">=$(vMinHour)<$(vMaxHour)"}

This can also be done with timestamps but a bit more complicated bacause of format issues.