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 help!

count({< ReleaseYear = {"2010" or "2011" or "2012"} - ReleaseYear = {"2013", "2014", "2015"}>} [ProductName])

I am trying to do a distinct count of productnames where it has release years of 2010 or2011or 2012 but do not have releases 2013or 2014or2015. How can I write this up??

Thanks!

13 Replies
sunny_talwar

I am still trying to understand, will let you know if I have questions

sunny_talwar

This?

Capture.PNG

Script:

LOAD AutoNumber(productname&Year_Dt) as Key,

  productname,

    Release,

    Year_Dt

FROM

[https://community.qlik.com/thread/228002]

(html, codepage is 1252, embedded labels, table is @2);

Expression:

Count(DISTINCT {<Key = {"=Max(Release) <> 2012"}>} productname)

sunny_talwar

Or may be you can use this expression:

Count(DISTINCT {<Key = {"=Max(Release) < 2012"}>} productname)

Not applicable
Author

Hi

we can use this expression in set analysis

Count({<Year=-{2013,2014,2015}>},Prouductname)