I have a ten-country data set. Each nation has more than eight items, and my firm sells three of them in each country: A, B, and C.

So now I'd want to figure out what percentage of the market my items have in each nation.

As an example, if overall sales for 8 items in nation 1 total 100 and sales for products A+B+C total 35, my company's market share in country 1 is 35/100= 35%.

Mar 17, 2022 in Tableau 1,464 views

## 1 answer to this question.

It depends on what you want to do with the data after that; if you just want the number, perform the following:

Make a calculated field in Excel. sum([Sales]) with a fixed [country]: TotalSalesPerCountry (calculates the total sales per country)
Create a calculated variable called CompanySalesPerCountry using the following formula: fixed [country]: sum
(IIF([Product] = 'A' OR [Product] = 'B' OR [Product] = 'C',[Sales],0)) (calculates total amount for each nation when [PRODUCT] = A, B, or C)
AVG([CompanySalesPerCountry]) / AVG([CompanySalesPerCountry]) / AVG([CompanySalesPerCountry]) / AVG([CompanySalesPerCount ([TotalSalesPerCountry])
Change the final field's Properties to 'Percent', then drag [Country] to the rows and [MarketShare] to the columns.

Elevate your data visualization skills with our Tableau Course and unleash the power of insightful analytics.

• 9,060 points

## How to calculate the percent of records within a group in tableau?

You can click the measure SUM(Number of Records) and ...READ MORE

+1 vote

## How to calculate the number of hours worked in Tableau?

Try using this LOD expression {fixed user : ...READ MORE

## How to color code cells of a column based on the text value in Tableau

You can use the following steps to ...READ MORE

## How to group bins in a tableau histogram?

One of the simple way is by ...READ MORE

## Using Python and Tableau in conjunction with one another

Is it possible to mix Python visualisations ...READ MORE

## Tableau Desktop Inside Tableau Server

Is there an executable for Tableau Desktop ...READ MORE

## Tableau Map view Continent List

I've been attempting to tidy up my ...READ MORE

I'm brand new to tableau server. I ...READ MORE