Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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 |
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"
If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.
Proud to be a Microsoft Fabric Super User
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.
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)
If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.
Proud to be a Microsoft Fabric Super User
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
17 | |
9 | |
8 | |
7 | |
7 |