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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Bansi008
Helper III
Helper III

How to do percentage calculation in the Power BI

Hi guys – I have a sample table like below in Power BI editor query. I need to calculate market value % using the values below. In excel we usually calculate value1/ SUM(column value), Value2/SUM(column value) and so on. How we can calculate the thing in the powerBI? I want add extra column for this calculation.

 

Market Value

123456

1234567

1236547

136547896

1478523699

1236547

 

 

 

3 REPLIES 3
jennratten
Super User
Super User

You can find each row's percent of the total like this:

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjQyNjE1U4rVgTHNYWwzUxMoG8y0sISqAjJNgbKWlqgKYwE=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [#"Market Value" = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"Market Value", Int64.Type}}),
    #"Inserted Percent Of" = Table.AddColumn(#"Changed Type", "Percent Of", let varTotal = List.Sum ( #"Changed Type"[Market Value] ) in each [Market Value] / varTotal * 100, type number)
in
    #"Inserted Percent Of"

 

jennratten_0-1680538073372.png

 

Thanks for the response. but i am not sure how to apply this solution since PowerBI tool is very much new for me. Can you please guide me how i can implement this solution in the tool. I have populated data connecting to Oraclt database and column as below. 

Bansi008_0-1680597397036.png

 

 

Sure thing - click the last step in your query settings, then click the function button in the formula bar.  The name of the prior step will appear in the formula bar.  Paste this into the formula bar and replace #"Changed Type" with your previous step.

= Table.AddColumn(#"Changed Type", "Percent Of", let varTotal = List.Sum ( #"Changed Type"[Market Value] ) in each [Market Value] / varTotal * 100, type number)

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.