Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
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.
BI Consultant
Hi,
Set analyses would do it/
Expr1: Sum({<(Counrty = )>} Orders)
Expr2 : Sum({<(Region= )>} Orders)
Expr3: Expr1/Expr2
Regards,
Jonathan
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.
BI Consultant
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!
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