Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Timestamp field between two other fields

See attached.  I'm thinking this is a formatting issue but I've lost enough time to figuring it out myself.

I'm trying to write the set analysis for Task_Opened_At is between Visit_FirstViewByDay and Visit_IncidentWindowEnd but nothing has worked for me.  The results should be zero so I'm testing with Task_Opened_At <= Visit_FirstViewByDay and >= Visit_IncidentWindowEnd.  This should count all the records but I'm getting no results.

1 Solution

Accepted Solutions
Not applicable
Author

Please see if this helps.

View solution in original post

21 Replies
Frank_Hartmann
Master II
Master II

Try like:

1.Possibility:

Dimension:

=if(Task_Opened_At<= Visit_FirstViewByDay and Task_Opened_At>= Visit_IncidentWindowEnd and Visit_ScriptsRun>0 ,Visit_Date)

Expression:

=Count(DISTINCT Task_Number)

or

2.Possibility:

Dimension:

=Visit_Date

Expression:

count({<Task_Opened_At={">=$(=only(Visit_IncidentWindowEnd,'M/D/YYYY'))<=$(=only(Visit_FirstViewByDay,'M/D/YYYY'))"},Visit_ScriptsRun={'>0'}>}DISTINCT(Task_Number))

hope this helps

sunny_talwar

How about this expression:

Count(DISTINCT {<Task_Number = {"=Task_Opened_At <= Visit_FirstViewByDay and Task_Opened_At >= Visit_IncidentWindowEnd"}>} Task_Number)


Capture.PNG

PrashantSangle

Hi,

What about this expression,

Count(DISTINCT {<Task_Opened_At={"<=$(=max(Visit_FirstViewByDay))>= $(=min(Visit_IncidentWindowEnd))"}>}Task_Number)

Regards,

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Anonymous
Not applicable
Author

  1. I haven't tried this yet but I'm thinking this will cause my dates chart to show only the dates where a Task exists and I like to show zero values.
  2. This one appeared to work correctly at first but as soon as I switched to <=Visit_IncidentWindowEnd and >=Visit_FirstViewByDay the data doesn't change.  It should show zero results.
Anonymous
Not applicable
Author

No luck with any of the expressions.

sunny_talwar

The image provided above is not what you are looking to get?

What is the expected output here?

Anonymous
Not applicable
Author

No because the formula isn't actually working.  It looks like you used FLOOR() on all the time stamps because their times have been lost and this expression does not work in my original file.

sunny_talwar

There is no Floor function used:

Count(DISTINCT {<Task_Number = {"=Task_Opened_At <= Visit_FirstViewByDay and Task_Opened_At >= Visit_IncidentWindowEnd"}>} Task_Number)

Have you tried opening the file I have attached with my initial response?

Anonymous
Not applicable
Author

I have.  If you look at the data in the table box in the file you attached all the time stamps have lost their actual time and look like FLOOR() was used on them.  When I refresh the data in the file you attached with the original data, this expression does not work.