Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
p_1
Contributor II
Contributor II

Sum Values Irrespective of one field

Hello, I want to have the Market share of each company by country, and I don't know how to do this calculation using set analysis.

Any suggestions?

Table1: Contains the total amount by company and country

CountryCompany1Company2Company3Total
C1300025009006400
C24000300015008500
C3350014008005700
C4200010008003800
C560004500260013100

 

What I want is to have a table like the following, which contains the amount of each cell in table1 over the total by country

Table2:

CountryCompany1Company2Company3
C147%39%14%
C247%35%18%
C361%25%14%
C453%26%21%
C546%34%20%
1 Solution

Accepted Solutions
Taoufiq_Zarra

@p_1  if your data input is like :

Taoufiq_Zarra_0-1617616238568.png

you can use pivot table with:

dimension: country and company

measure :

sum(Value)/sum(Total<Country> Value)

 

output:

Taoufiq_Zarra_1-1617616293796.png

 

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

2 Replies
Taoufiq_Zarra

@p_1  if your data input is like :

Taoufiq_Zarra_0-1617616238568.png

you can use pivot table with:

dimension: country and company

measure :

sum(Value)/sum(Total<Country> Value)

 

output:

Taoufiq_Zarra_1-1617616293796.png

 

 

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
p_1
Contributor II
Contributor II
Author

Thank You @Taoufiq_Zarra , if i want to add year to my set analysis expression how should i write it?

sum({<year = {2020}>} Value) / sum({<year = {2020}, Country>} total Value)?