Forum Discussion

shantupm5's avatar
shantupm5
Icon for Helper III rankHelper III
2 years ago
Solved

Total in % for each region Split

Here is my raw data

 

Region

Region Vol Split

AMERICAS

21%

APAC

79%

AMERICAS

71.0%

APAC

9.0%

EMEA

20.0%

EMEA

10%

APAC

55%

EMEA

16%

APAC

19%

AMERICAS

100%

AMERICAS

100%

EMEA

100%

Americas

50%

APAC

30%

EMEA

20%

Japan

79%

Canada

2%

Americas

19%

APAC

100%

North America

34%

APAC

28%

EMEA

38%

AMERICAS

100%

North America

100%

APAC

100%

  When i pivot it, I get below table which sums up to 1300% which should not be the case. 

 AMERICAS

461%

APAC

420%

Canada

2%

EMEA

204%

Japan

79%

North America

134%

Grand Total

1300%

                                                                                     

I divided each region by grand total (ex: Americas (461%/ 1300%) which results to 35% as illustrated in the below table. How can we solution this in power bi?

 

Region

 

AMERICAS

35.5%

APAC

32.3%

Canada

0.2%

EMEA

15.7%

Japan

6.1%

North America

10.3%

Grand Total

100%

  • hi, shantupm5 

     

    try below

    result =
    var a = sum('tablename'[region vol split])
    var b = calculate(sum('tablename'[region vol split]),removefilters('tablename'[region]))
     return
    divide(a,b)

2 Replies

  • Dangar332's avatar
    Dangar332
    Icon for Resident Rockstar rankResident Rockstar

    hi, shantupm5 

     

    try below

    result =
    var a = sum('tablename'[region vol split])
    var b = calculate(sum('tablename'[region vol split]),removefilters('tablename'[region]))
     return
    divide(a,b)