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: 
Confused_Rob
Contributor II
Contributor II

Qlik Sense function for Date range

Hello,

 

I have a IF statement, where i have a class which include only date, but i want to filter it to be the given date and before that.

My example looks like this

 

= IF( count (< [EventCity] = {'London'}, [EventDate] = {'2019-10-08'}>))

 

This will only give me the count for just the Date 2019-10-08, but i want to know all the events that happends in London 2019-10-08 and before . I think there should be an greater/less than symbol before e.g [EventDate] = {'<2019-10-08'}.

But that doesn´t work.

Does anyone know how the rule works?

 

Table looks like this:

 

EventCity EventDate
London 2019-10-08
Madrid 2018-11-23
London 2019-05-23
London 2017-11-23
Madrid 2019-05-07
Madrid 2019-03-06
London 2019-03-19
Madrid 2018-06-06
London 2020-04-18
London 2021-05-02
1 Solution

Accepted Solutions
chrismarlow
Specialist II
Specialist II

Hi,

I am not sure I understand where you are using your function so this might not be the only change, but for set analysis with < etc you need to use double quotes, so something like [EventDate]={"<2019-10-08"}.

Cheers,

Chris.

View solution in original post

2 Replies
chrismarlow
Specialist II
Specialist II

Hi,

I am not sure I understand where you are using your function so this might not be the only change, but for set analysis with < etc you need to use double quotes, so something like [EventDate]={"<2019-10-08"}.

Cheers,

Chris.

Confused_Rob
Contributor II
Contributor II
Author

Ths worked,

thank you!