Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get data with in date range?


Hi,

I have table with below details

Dimension: Member

Expression: =Count({<Date={">=$(WeekStart(today())-7))<=$(Weekend(today())-8)"},Tailors={'Open','open'}>}ID)

The data should show the count of ID between 23/06/2014 and 27/06/2014 for open tailors. The table is showing incorrect data. Can anyone suggest me do I need to make any changes in expression?

Thanks.

9 Replies
MK_QSL
MVP
MVP

=Count({<Date={">=$(=Date(WeekStart(Today())-7))<=$(Date(WeekEnd(Today())-7))"},Tailors={'Open','open'}>}ID)

Change 7 to 8 as per your date requirements...

Not applicable
Author

Thanks. I tried it. It is showing count more when compared to database records.

MK_QSL
MVP
MVP

Use Distinct ID

sasikanth
Master
Master

Hi

Try some thing like this

=Count( DISTINCT {<Date={">=$(=Date(floor((WeekStart(Today())-7)))<=$(Date(floor(WeekEnd(Today())-7)))"},

Tailors={'Open','open'}>}ID)

Not applicable
Author

Same count getting. I created two variables from and to

From = =WeekStart(today()-7)

To= =Date(WeekEnd(today()-5)-1,'DD/MM/YYYY')

I used button 'Apply' with these and the data is showing correct.

But I would need to show the data with expression instead of variables. Is that possible?

Thanks.

Not applicable
Author

Thanks. tried. showing all blank values. do I need to change anything?

jonathandienst
Partner - Champion III
Partner - Champion III

The expression was missing an = sign:

Count({<Date={">=$(=Date(WeekStart(Today(1))-7)) <=$(=Date(WeekEnd(Today(1))-7))"}, Tailors={'Open','open'}>} ID)

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Thanks. near to result. getting extra 4 values. Actually the count is 460. but it is showing 464. Any change please.

MK_QSL
MVP
MVP

Provide sample data