Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
sdhn
Responsive Resident
Responsive Resident

Calculate %

Hi All,

 

I have a table with two columns.

 

CityProfit
Chicago60
Los Vegas80
New York40
Los Angeles 90
Houston10
Total Profit280

 

I need to add one more column "Percentage %".  and insert values for "Profit/Total Profit" in th new column. 

Any help will be appreciated.  I want to done this on Power Bi.   Thanks 

 

 

1 ACCEPTED SOLUTION
FrankAT
Community Champion
Community Champion

Hi @sdhn ,

you can do it like this:

 

25-05-_2021_22-18-50.png

 

 

Sum of Profit = SUM('Table'[Profit])

Percentage = DIVIDE([Sum of Profit],CALCULATE([Sum of Profit], ALL('Table')))

 

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

View solution in original post

6 REPLIES 6
FrankAT
Community Champion
Community Champion

Hi @sdhn ,

you can do it like this:

 

25-05-_2021_22-18-50.png

 

 

Sum of Profit = SUM('Table'[Profit])

Percentage = DIVIDE([Sum of Profit],CALCULATE([Sum of Profit], ALL('Table')))

 

 

With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)

amitchandak
Super User
Super User

@sdhn , new column

divide(Table[Profit],sum(Table[Profit]))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
sdhn
Responsive Resident
Responsive Resident

Table real name is MailPackage and Column name is MAIL COUNT instaed of Profit. 

I am getting following message.

 

I right clicked on Table and choose New Column and insert following code:

 

The syntax for 'sum' is incorrect. (DAX(DIVIDE(MailPackage[MAIL COUNT]sum(MailPackage[MAIL COUNT])))).

 

Your help will appreciaed again.  Thanks 

sdhn
Responsive Resident
Responsive Resident

I added "," before sum and its work BUT

 

Please note:

I have a total of mail count (Profit in above example)  in the last row.  

It is 280 in above example.

 

I want to get result of percentage as mail counts/total mail counts * 100 for each row in the newly percentage column as below:

 

60/280*100

80/280*100

40/280*100

90/280*100

10/280*100

 

Thanks 

sdhn
Responsive Resident
Responsive Resident

It is ok.  I removed the total from the source file. I appreciate your help.  thx

Try Column = DIVIDE( MailPackage[MAIL COUNT], SUM(MailPackage[MAIL COUNT] )

 

No DAX required.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors