Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
DipeshVadgama
Partner - Creator II
Partner - Creator II

Ratio Contribution

Hi All,

Below it data,

   

Country
India
Japan
China
India
India
Japan
China
India
India
Japan
China
USA
India
China
China
USA
India
Japan
China
USA
India
USA
USA

I am trying to find out ration of each country with total country while loading script, below example

   

Country       %
India26.1%
Japan34.8%
China17.4%
USA21.7%
1 Solution

Accepted Solutions
micheledenardi
Specialist II
Specialist II

see attached file.

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

4 Replies
micheledenardi
Specialist II
Specialist II

see attached file.

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
DipeshVadgama
Partner - Creator II
Partner - Creator II
Author

Hi Michele,

Sorry but I can't open this file. Can please paste script here, thanks 🙂

micheledenardi
Specialist II
Specialist II

Country_tmp:

LOAD

  Country

FROM [Country.xlsx]

(ooxml, embedded labels, table is Foglio1);

Country:

NoConcatenate

Load

  Country,

  num(count(Country)/NoOfRows('Country_tmp'),'#.##0,0%') as percentage

Resident Country_tmp Group by Country;

drop Table Country_tmp;

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
DipeshVadgama
Partner - Creator II
Partner - Creator II
Author

Thanks Michele