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

Set Analysis with Dates

HI

I want to show the data for a specific date.  Can you help me with the set analysis syntax for that please?

(It't the CreatedDateTime field).  I want to show it for Today() -1.

=Count({$ <Status={"ACTIVE"},Allocated_Ind={"Unallocated"}, CreatedDateTime_Incident={'=$(=Today()-1)'}  >} DISTINCT IncidentNumber)

17 Replies
Not applicable
Author

How do I attach the qvw ?

tresesco
MVP
MVP

reply->Use advanced editor(top right)->attach(bottom right)

Not applicable
Author

I've reduced the data. 

Check the Unallocated Sheet.  Also consider : I hvae two Date fields I can use.  : CreatedDateTime_Incident and CreatedDateTime_Proces_DayName.  One is a date and the other numeric.

Not applicable
Author

Hi

  Here Am Attaching  QVWJust go through That u will find the exact ans which one you are looking for

  Just Change the variable expression according to u

Thanks

Manju

PrashantSangle

Hi,

I am using personal edition.

Just tell me

What is date format of CreatedDateTime_Incident.

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 🙂
Not applicable
Author

Set a Variable for this expression

vtest'=(MAX(DATE1))-1'

'and call that variable in to expression

=sum({<DATE1={'$(VTEST)'}>}sales)

tresesco
MVP
MVP

Your date field CreatedDateTime_Incident is a floating point numer field. If you need to compare that in the set analysis, better create a date filed in the script remving decimal part like:

Load

          Date(Floor(SourceDate)) as CreatedDateTime_Incident

Then the written above should work.

Anonymous
Not applicable
Author

Hi Bradley,

I checked your attached qvw for incident management

the issue you are facing is because  CreatedDateTime_Incident is in Date time format

hence the date(today()-1) or anything light this will not match to it hence set analysis is giving 0

you have 2 options

1. simply add an additional column to your date truncating down the timestamp part of CreatedDateTime_Incident

you can  name that as CreatedDate_Incident

2. frame you expression in greater than equal to start of the date of ( today()-1) i mean 00:00:01 hrs

and less than equal to end of the date of (today()-1) 23:59:59

Regards,

Bhagirath