# New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

## 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:

 TLA Ethnic group Age5 Gender Pop 001 European 00-04 Female 441 001 European 00-04 Male 513 001 European 05-09 Female 1161 001 European 05-09 Male 1173 001 European 10-14 Female 291 001 European 10-14 Male 288 001 European 15-19 Female 48 001 European 15-19 Male 39

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
Esteemed Contributor

## Re: Is this Set Analysis?

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.

Esteemed Contributor II

Contributor III

## Re: Is this Set Analysis?

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

New Contributor III

## Re: Is this Set Analysis?

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