Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date selection and Count expression not evaluating properly

Hello

Expression in chart: Count({<Doc_Date = {'>=$(vStartDate)<=$(vEndDate)'}>} {< ID = {">=$(vMaxID)"}>} EQUNR_S)

Selected Start Date 01.04.2014 and End Date 31.04.2014 but it's not evaluating properly also records are not filtered properly.

Count is coming wrong.

Act_TypEQUNR_SIDDoc_DateCount
E17603382701.02.20111
T176032919815.04.20131
F176032919415.04.20131
D176032919615.04.20131

Ashif

1 Solution

Accepted Solutions
kuba_michalik
Partner - Specialist
Partner - Specialist

Proper syntax is

Count({<Doc_Date = {">=$(vStartDate)<=$(vEndDate)"}, ID = {">=$(vMaxID)"}>}  EQUNR_S)

Searches in set analysis go in double quotes. They might work with single quotes but it's a bug (single quotes should only be used for string literals) and taking advantage of it is not advisable.

If that doesn't work, then the likely reason is what the vStartDate, vEndDate and vMaxID variables are actually expanding to.

Are the numbers you posted a sample of the data, or how the table with this expression looks?

View solution in original post

3 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Sysntax is not correct ...

try this

Count({<Doc_Date = {'>=$(vStartDate)<=$(vEndDate)'}>}, ID = {'>=$(vMaxID)'}>} EQUNR_S)

Not applicable
Author

I think synstax is right. Expression not evaluating.

kuba_michalik
Partner - Specialist
Partner - Specialist

Proper syntax is

Count({<Doc_Date = {">=$(vStartDate)<=$(vEndDate)"}, ID = {">=$(vMaxID)"}>}  EQUNR_S)

Searches in set analysis go in double quotes. They might work with single quotes but it's a bug (single quotes should only be used for string literals) and taking advantage of it is not advisable.

If that doesn't work, then the likely reason is what the vStartDate, vEndDate and vMaxID variables are actually expanding to.

Are the numbers you posted a sample of the data, or how the table with this expression looks?