Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have data in an excel file wherein the Overall Percentage should be 100%.
I want to compute that if for example, the Column F is NO, then the Overall Percentage should be multiplied by 0.5, but if YES then just 0.
Also, if there is a value in Column G(Name), then another multiply the Overall Percentage by 0.15.
For every input in Column H-I, if it has any value, then it should be multiplied by 0.075 from the Overall Percentage also.
How to put the formula in Powerbi? I need to put it in a bar graph in PowerBI
This is the formula if it's in excel
=(1-((IF(F2="NO",0.5,0))+(COUNTA(G2)*0.15)+(COUNTA(H2,I2)*0.075)*0.05)))/1
Solved! Go to Solution.
Hi, @Anonymous ;
You could try to create a custom column.
=1-(if [found]="NO" then 0.5 else 0)-(List.NonNullCount({[Name]})*0.15)-(List.NonNullCount({[age],[Address]})*0.075*0.05)
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WqijNLVDSUTI0MjQ2NDIGsopSS4AIyDDVN9U3MjAyAjLLU1OzFQyBjMjUYiAJVg8k8kpzciBcMyM9UwNVpVidaKWSjEywiabGJsamIANLUmHmGeE2D8U0c5BRsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Code = _t, Number = _t, ID = _t, #"date processed" = _t, #"audit week" = _t, found = _t, Name = _t, age = _t, Address = _t, Info = _t, #"overall " = _t]),
#"Replaced Value" = Table.ReplaceValue(Source,"",null,Replacer.ReplaceValue,{"Name", "age", "Address", "Info"}),
#"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"Code", type text}, {"Number", Int64.Type}, {"ID", type text}, {"date processed", type date}, {"audit week", type text}, {"found", type text}, {"Name", type text}, {"age", Int64.Type}, {"Address", Int64.Type}, {"Info", type text}, {"overall ", Percentage.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each 1-(if [found]="NO" then 0.5 else 0)-(List.NonNullCount({[Name]})*0.15)-(List.NonNullCount({[age],[Address]})*0.075*0.05))
in
#"Added Custom"
The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous ;
You could try to create a custom column.
=1-(if [found]="NO" then 0.5 else 0)-(List.NonNullCount({[Name]})*0.15)-(List.NonNullCount({[age],[Address]})*0.075*0.05)
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WqijNLVDSUTI0MjQ2NDIGsopSS4AIyDDVN9U3MjAyAjLLU1OzFQyBjMjUYiAJVg8k8kpzciBcMyM9UwNVpVidaKWSjEywiabGJsamIANLUmHmGeE2D8U0c5BRsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Code = _t, Number = _t, ID = _t, #"date processed" = _t, #"audit week" = _t, found = _t, Name = _t, age = _t, Address = _t, Info = _t, #"overall " = _t]),
#"Replaced Value" = Table.ReplaceValue(Source,"",null,Replacer.ReplaceValue,{"Name", "age", "Address", "Info"}),
#"Changed Type" = Table.TransformColumnTypes(#"Replaced Value",{{"Code", type text}, {"Number", Int64.Type}, {"ID", type text}, {"date processed", type date}, {"audit week", type text}, {"found", type text}, {"Name", type text}, {"age", Int64.Type}, {"Address", Int64.Type}, {"Info", type text}, {"overall ", Percentage.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Custom", each 1-(if [found]="NO" then 0.5 else 0)-(List.NonNullCount({[Name]})*0.15)-(List.NonNullCount({[age],[Address]})*0.075*0.05))
in
#"Added Custom"
The final output is shown below:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
10 | |
8 | |
6 | |
6 | |
6 |