# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikView Fans! We’d love to hear from you.
Rules, plus terms and conditions, can be found here.
New Contributor

## Set Analysis & Current Field Selection

Hi all,

I need some help in formulating a set analysis for my table. Currently I have a region list box consisting of ( America, Asia, Oceania, etc etc) and a country list box (Australia, South africa etc)

I would like my end result to be like this ---> Sum of Order for the current selection in region list box divided by Sum of orders for the current selection in country list box.

Example:

Total Orders counts in Oceania = 1000

Total Order Counts in Australia = 10

Result = 100

1 Solution

Accepted Solutions
Employee

## Re: Set Analysis & Current Field Selection

Hi,

I agree with Jonathan about that set analysis will do, although the expressions should be different (assuming you are always going to select a country within a continent):

`Sum({< Country = >} TOTAL OrderAmount) / Sum(OrderAmount)`

The dividend is used to keep the continent selection, regardless the country selected. The divisor will return the sum for the current selection: if there is no contry or continent selected, the result shuold be 1 (sum of all divided by sum of all).

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

4 Replies
Not applicable

## Set Analysis & Current Field Selection

Hi,

Set analyses would do it/
Expr1: Sum({<(Counrty = )>} Orders)

Expr2 : Sum({<(Region= )>} Orders)

Expr3: Expr1/Expr2

Regards,

Jonathan

Employee

## Re: Set Analysis & Current Field Selection

Hi,

I agree with Jonathan about that set analysis will do, although the expressions should be different (assuming you are always going to select a country within a continent):

`Sum({< Country = >} TOTAL OrderAmount) / Sum(OrderAmount)`

The dividend is used to keep the continent selection, regardless the country selected. The divisor will return the sum for the current selection: if there is no contry or continent selected, the result shuold be 1 (sum of all divided by sum of all).

Hope that helps.

Miguel Angel Baeyens

BI Consultant

Comex Grupo Ibérica

New Contributor

## Re: Set Analysis & Current Field Selection

I have tried the above method, and yes, the results shows the sum of orderamt for all the countries regarding of which country i selected. This is useful for me.

Thanks!

New Contributor

## Re: Set Analysis & Current Field Selection

Thanks jonathan!

I have some changes in the expression ( bracket before the word "country" removed)  and combined the them into one:

Sum({Region=>} Order) / Sum(Country=>} Order)

It works fine ! Thanks again