Qlik Community

QlikView Documents

Documents for QlikView related information.

Set Analysis: syntaxes, examples

Not applicable

Set Analysis: syntaxes, examples

For those that find this document in a search - you may also want to check out these videos to learn Set Analysis:

A Beginners' Introduction to Set Analysis

About the attached document:

The doc is organized by question:

- to select all or just known members

- to select through search strings, variables that can store just members but also the whole set

- to select using two fields, a boolean test, a function like concat(), sum(), p() or e(), rank()

In this updated version, I have added some few sections and some examples.


It is a translation of a french doc I have written few weeks ago: http://community.qlik.com/docs/DOC-4889

Comments
tim_at_ford
New Contributor III

To whoever can help me!!

I want to do a YOY analysis for my KPI.  I have five years of data.  I want to subtract out the counts of 01/01/2018 thru 08/29/2018 against 01/01/2017 thru 08/28/2017, a YOY.

Now I know this algorithm is wrong (being new to Qlik View Set Analysis)

=Num(Count({<Salesdate={"<=$(vCurrentDate)"}>}indictor) - count({<Salesdate={"<=01/01/2018"}>}indicator)
   - Count({<Salesdate={"<=$(vPrevDate)"}>}indicator)    - count({<Salesdate={"<=01/01/2017"}>}indicator), '###,##0')

However, individual everything for each year works fine!  I get my 2018 and 2017 counts individuals so I know I'm doing my set analysis correctly.

Where I run into issues is how to perform an arithmetic operation on both sets.  I know I'm supposed to get a negative number.  My first set has 900 records (2018) and my second set has 2,300 (2017).   I should get a negative number!!

Am I using the correct functions?   I have review a lot of material and it all appears to be just  comparing year to year not YOY.

Thanks for any help

 

 

 

0 Likes
Version history
Revision #:
1 of 1
Last update:
‎2013-09-26 04:24 AM
Updated by: