Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis to exclude Dates

I have a date ranging from 03/20/1995 to 06/27/2015. I wan't to only include any data linked with years 2014 and 2015. How would I write the set analysis to exclude anything before 2014?

Initial thoughts

=if(DateSigned <= '01/01/2014', null(),num(avg(date(DateOfCreation) - date(DateSigned)), '#,##0'))

3 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

I'd suggest something like this:

num(

     avg({<DateSigned={"=year(DateSigned)>=2014"}>} DateOfCreation - DateSigned)

, '#,##0')


cheers,

Oleg Troyansky

QlikView Your Business: An expert guide to Business Discovery with QlikView and Qlik Sense

Ask me about Qlik Sense Expert Class!
PrashantSangle

Hi,

You can create new field for year of Date Signed in script using year()

like Year(DateSigned) as DateSignedYear

and use that field to compare in set analysis

like

num(avg({<DateSignedYear={"<2014"}>} DateOfCreate - DateSigned),'#,##0')

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 🙂
sasiparupudi1
Master III
Master III

num(avg({<DateSignedYear={">'01/01/2014'"}>} DateOfCreate - DateSigned),'#,##0')