Export Ratio for companies of multiple countries

julianwi

New Member
Joined
Jul 12, 2013
Messages
19
Hallo!
I am currently working on a DAX-Measure that is supposed to calculated the Export Ratio (percentage of sales outsinde of the home country) of multinational group of companies.
Each company has it's home country. Right now the country code is just hard coded in my measure:
Export Ratio=DIVIDE(CALCULATE([Sales];all('Customer');'Customer'[County Code]<>"US");[US])
What I now want is to replace the hard coded country code with the country code of each company. The home country of each company can be found in the company-table.
I tried the following:
Export Ratio=DIVIDE(CALCULATE([Sales];all('Customer');'Customer'[County Code]<>Values('Company'[Home Country]);[US])
This however does not work since company and customer have no relationship. I would think that I need some sort of loop across each home country and to calculate the measure for that country, summing up (i.e. using a weighted average) the results.
But I have not idea how that could be implemented.
Could anyone help?
Thanks and regards
Julianwi
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple

Forum statistics

Threads
1,223,958
Messages
6,175,628
Members
452,661
Latest member
Nonhle

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top