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: 
Asli_
Contributor
Contributor

Get selected date range into the expression as date value

Hi everyone

I need to make a calculation which uses the selected date in the date picker object and use this date value to filter another date field in an expression. For example I select, between 2021/10/01-2021/10/31 in the date picker and variable name is Sold_Date.

I try to use this date range in the formula as:

=

count({<IS_SOLD ={'Yes'}>}REQUEST_ID)
-
count({<IS_SOLD ={'Yes'},ENTRY_DATE_DAY={'>=$(=vminsold) <=$(=vmaxsold)'}>} REQUEST_ID)

I mean I want to pick just date value (in our example 2021/10/01-2021/10/31) regardless of Sold_date variable and I want to use this range for ENTRY_DATE_DAY field in the formula.

Expression is verified by Qlik  (in expression window, warning says OK). The problem is that part of the formula after minus does not work. It returns the result as zero.

Does expression seem OK to you?

Thanks

1 Solution

Accepted Solutions
marcus_sommer

You may try it with following changes:

ENTRY_DATE_DAY={">='$(vminsold)'<='$(vmaxsold)'"}

- Marcus

View solution in original post

2 Replies
marcus_sommer

You may try it with following changes:

ENTRY_DATE_DAY={">='$(vminsold)'<='$(vmaxsold)'"}

- Marcus

Asli_
Contributor
Contributor
Author

Thanks it works 🙂