Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
riceball
Contributor
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
Miguel_Angel_Baeyens

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

View solution in original post

4 Replies
Not applicable

Hi,

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

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

Expr3: Expr1/Expr2

Regards,

Jonathan

Miguel_Angel_Baeyens

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

riceball
Contributor
Contributor
Author

Thanks for your help!

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!

riceball
Contributor
Contributor
Author

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