Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Country | Company1 | Company2 | Company3 | Total |
C1 | 3000 | 2500 | 900 | 6400 |
C2 | 4000 | 3000 | 1500 | 8500 |
C3 | 3500 | 1400 | 800 | 5700 |
C4 | 2000 | 1000 | 800 | 3800 |
C5 | 6000 | 4500 | 2600 | 13100 |
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:
Country | Company1 | Company2 | Company3 |
C1 | 47% | 39% | 14% |
C2 | 47% | 35% | 18% |
C3 | 61% | 25% | 14% |
C4 | 53% | 26% | 21% |
C5 | 46% | 34% | 20% |
@p_1 if your data input is like :
you can use pivot table with:
dimension: country and company
measure :
sum(Value)/sum(Total<Country> Value)
output:
@p_1 if your data input is like :
you can use pivot table with:
dimension: country and company
measure :
sum(Value)/sum(Total<Country> Value)
output:
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)?