Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!

Set Analysis - Part 2 - Cool Stuff You Can Do (video)

100% helpful (1/1)
cancel
Showing results for 
Search instead for 
Did you mean: 
Michael_Tarallo
Employee
Employee

Set Analysis - Part 2 - Cool Stuff You Can Do (video)

Last Update:

May 13, 2022 5:58:28 PM

Updated By:

Michael_Tarallo

Created date:

Mar 25, 2015 3:29:11 PM

Attachments

Set analysis offers a way of defining a set (or group) of data values that is different from the normal set defined by the current selections. Watch this video to learn more about the cool stuff you can do with Set Analysis as well as to get a better understanding of its expression syntax and how it can be used.

 

Previous Video: A Beginners' Introduction to Set Analysis

 

NOTE: For a more complete and deeper dive of Set Analysis check out this excellent document: Set Analysis: syntaxes, examples

 

Sample App: (Qlik Sense is .qvf - QlikView is .qvw)

 

  • See attached .qvf file for sample Qlik Sense application
  • If using Qlik Sense Desktop:
    • Copy .qvf file to C:\Users\<user profile>\Documents\Qlik\Sense\Apps
  • Refresh Desktop Hub (F5)
  • If using Qlik Sense Server
    • Import .qvf using the QMC and then access from My Work Stream in hub
  • For the .qvw - just opened with QlikView Desktop

 

Set Analysis Expressions:

 

Conditions  (hard-coded lists,searches,wild card,comparison operators, not equal):

 

Sum({$<CategoryName={'Bath Clothes'}>}Sales)Sum({$<CategoryName={'Bath Clothes','Babywear'}>}Sales)

Sum({$<CategoryName={"*Clothes"}>}Sales)

Sum({$<CategoryName={"*Clothes",'Babywear'}>}Sales)

Sum({$<Year={'2013'}>}Sales)

Sum({$<Year={2013,2014}>}Sales)

Sum({$<Year={"<2014"}>}Sales)

Sum({$<Year-={2014}>}Sales)

Conditions using variables:

SET vDefaultCat = 'Bath Clothes';

Sum({$<CategoryName={$(vDefaultCat)}>}Sales)

$ Expansion - using functions to evaluate comparisons values:

Sum({$<Year={"$(=Year(Today()))"}>}Sales)

Conditions with multiple dimensions:

Sum({$<CategoryName={'Babywear'},Year={2014}>}Sales)

Conditions with measures:

Sum({<[Model Variation]={"=SUM(PartSales) >=1000"}>}PartSales)

Labels (1)
Comments
evaristj
Contributor
Contributor

Great tutorial and better yet explanation. Thank you for your time and dedication to share knowledge.

0 Likes
jmuthoni
Contributor
Contributor

Hi, 

I am currently building a "what if analysis " app. 

 

The following is my script, as I am trying to use set analysis to fill the cells:

 

if($(Return to normal) = 5/1/2020 and $(Cycle time) <90,

sum({<Month={'4/1/2020','5/1/2020'}>}[Implant forecast] +

$(Opportunities already in the funnel)/8 + $(New Opportunities in April 2020)/8),

if($(Return to normal) = 5/1/2020 and $(Cycle time) <90,

sum({<Month={'6/1/2020'}>}[Implant forecast] +

$(Opportunities already in the funnel)/2)

 


))

 

The first sum works fine, but the second one does not sum up the cell?  Could you please advise on what I am missing ?

jmuthoni_1-1588195097002.png

 

Thanks,

 

Muthoni

 

0 Likes
Contributors
Version history
Last update:
‎2022-05-13 05:58 PM
Updated by: