Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Is this Set Analysis?

In an earlier post (now deleted) I made a poor job of explaining my needs.  Now I've heard of Set Analysis, and perhaps I can clarify.

I have a table containing the number of people in a region, grouped by Ethnic group, Age5 (age, grouped in 5-year bands), and Sex for each TLA (local authority) of interest.  I want to be able to use this figure as the denominator in an incidence study.

I want to restrict Qlik Sense's modifications of the denominator to these four groups.  Any other modifier will be the numerator.

So: my data looks like this sample:

 

TLAEthnic groupAge5GenderPop
001European00-04Female441
001European00-04Male513
001European05-09Female1161
001European05-09Male1173
001European10-14Female291
001European10-14Male288
001European15-19Female48
001European15-19Male39

If I select a TLA in my dataset, the denominator should sum Pop for that TLA.  I need to be able also to select an ethnic group, Age5, or Gender, and use the total for this selection as the denominator.  So: these elements are allowed to change, but this is the only modification allowed.

Elsewhere in my dataset I will modify the numerator by selecting an accident type and location.

I should be able to count the number of car crashes, for example; I should be able to modify these by the ethnic group, age group or gender of the person involved.

What I'm looking for is this: how do I show the number of car crashes involving European males aged 15-19 in a TLA, divided by the population size for European males in the TLA?  In a normal application the Pop figure is modified by the number of European males in the TLA.

I believe I'm looking for a Set Analysis, but I don't understand how my Set Analysis can group the denominator according to my four variables.  I'd appreciate any help!

4 Replies
OmarBenSalem

You can have your fields as filters, just drag and drop them in your sheet:

Then, if you want to only have a KPI object with the information based on your selection; it would have as an expression:

count(carCrashes) / sum({<AccidentType=,location=>}Pop)

With this, you'll have a count of car crashes that depends on your selections in all of the field divided by the population that depends on your selection but that won't be affected by your selection of the AccidentType and location.

vinieme12
Champion III
Champion III

Good reads for reference

https://community.qlik.com/docs/DOC-4951

https://www.analyticsvidhya.com/blog/2014/01/set-analysis-qlikview/

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
daveamz
Partner - Creator III
Partner - Creator III

Hi Steve,

Yes, the set analysis should do the work:

What I'm looking for is this: how do I show the number of car crashes involving European males aged 15-19 in a TLA, divided by the population size for European males in the TLA?  In a normal application the Pop figure is modified by the number of European males in the TLA.  

Something like:

In a table with one dimension ('TLA') use the following expression:

Sum({<[Ethnic group] = {'European'}, Age = {'15-19'}, Gender = {'Male'} >} Pop) /

Sum({<[Ethnic group] = {'European'}, Gender = {'Male'} >} Pop)

This should give you an idea of how you can use set analysis. Be aware that set analysis can be used in conjunction with filters (you can ignore certain filters, force others etc.)

Set analysis is very powerful and it is worth investigating the documentation. You can find a lot of resources here, on community in the blog post section.

Regards,

David

Anonymous
Not applicable
Author

Thank you Omar, Vineeth and David!

I believe I now have on my screen pretty much what I'm looking for, and you were all most helpful.

Our injury data allows us to filter by many fields, and for the moment I'll limit these to just three while I continue to learn.  At the moment, this dataset is looking very good.

Thank you,

Steve