Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
anuradhaa
Partner - Creator II
Partner - Creator II

Use Between inside set analysis

Hi,

I have date field called "Start Date" and it is in a format "10/31/2015  12:01:00 AM".

I want to get count(Start Date) for recent two dates.

If today is 2015/11/02 then i have to display 2015/11/02 and 2015/11/01.

I used =count({$<Start Date={"=Start Date>=Now(1)-2"}>}Country) as one expression and

=count({$<Start Date={"=Start Date>=Now(1)-1"}>}Country)

10 Replies
sasikanth
Master
Master

Try some thing like

count({$<Start Date={"=Start Date>=Date(Now(1)-2)"}>}Country)

tamilarasu
Champion
Champion

Hi AnuRadha,

Check the below one,

Count({$<Start Date={">=$(=Date(Now(1)-2,'DD/MM/YYYY hh:mm:ss tt'))"}>}Country)

Anonymous
Not applicable

First make sure format of both the dates is same.

You can take two variables like:

VStartDate=date(FieldName,'DD/MMM/YYYY')

VTodayDate=Date(Now(), 'DD/MMM/YYYY')

then your expression like:

=count({<StartDate={'>=$(=VStartDate)<=$(=VTodayDate)'}>} Country)

Hope This will Help!!!

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Any of those solutions doesn't work.

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

=count({$<[Start Date]={">=$(=Date(Today()-1))<=$(=Today()) "}>}Country)

Note: Date format Start Date and Today should be in the same format.

Hope this helps you.


Regards,

Jagan.

Anonymous
Not applicable

Share the sample data..

anuradhaa
Partner - Creator II
Partner - Creator II
Author

Hi Please use below excel, here mydate shows the date field i have

sasikanth
Master
Master

hi,

=count({<[MY Date]={">=$(=Date(now()-2) ,'MM/DD/YYYY hh:mm:ss tt')"}>}Country)

Working for Date level, check once

settu_periasamy
Master III
Master III

Hi,

try this..

=Count({<[MY Date]={">=$(=Timestamp(Max(Floor([MY Date])-1)))"}>}Country)