cancel
Showing results for
Did you mean:
Highlighted
mellas_k Regular Visitor

## How to Calculate Percentage using the total of column

Hello team please I need help,

I have this table :

Name   Number_A   Number_C

AA          5                         6

BB          9                       10

Total       14                      16

And I need to calculate  Number_C for each Name Divide by the total of Number_A

Exemple : I need to calculate:     (6/14)*100

(10/14)*100 …

NB : Number_A    / Number_C  are 2 calculate measure

1 ACCEPTED SOLUTION

Accepted Solutions Anonymous
Not applicable

## Re: How to Calculate Percentage using the total of column

Replace ALL(YourTable) with ALLSELECTED() and it should do the thing.

4 REPLIES 4 Anonymous
Not applicable

## Re: How to Calculate Percentage using the total of column

Hi,

You can create two measures:

```Total_Number_A = CALCULATE([Number_A];ALL(YourTable))

Number_C / Total_Number_A % = DIVIDE([Number_C];[Total_Number_A])```

Then just use Formatting options in Modeling tab of Power BI Desktop to make the last one measure formatted as percentage.

Hope that helps.

Cheers,

Pawel

mellas_k Regular Visitor

## Re: How to Calculate Percentage using the total of column

hi @Anonymous

Thanks for you answer but the problem that  I use a filter so when I use

`Total_Number_A = CALCULATE([Number_A];ALL(YourTable))`

It gives me all the count … Anonymous
Not applicable

## Re: How to Calculate Percentage using the total of column

Replace ALL(YourTable) with ALLSELECTED() and it should do the thing.

mellas_k Regular Visitor

## Re: How to Calculate Percentage using the total of column

@Anonymous

Announcements #### Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future. Learn the answers to some of the questions asked during the Amanda Triple A event. #### October 2019 Community Highlights

October was a busy month in the community. Read the recap article to learn about some of the events and content.  Top Kudoed Authors
Users Online
Currently online: 135 members 1,943 guests
Recent signins:
• ZhongTr0n • corange • Gururajv007 • PaulnMartin • v-jayw-msft • Jaweed • _Harikishore • Thuy • AlexisBICE • keeratibenz • chris886 • andres_guerrero • YukiPu_1993 • kevinjung 