Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi, I am unable to figure out why I cannot replicate the result in the above table. The difference lies in the results under the verdict legend.
This is the related power query m code for the above table:
#"Added Conditional Column" = Table.AddColumn(#"Renamed Columns2", "Verdict Score", each if [#"Overall Verdict "] = "IN" then 0 else if [#"Overall Verdict "] = "JI" then 0.5 else if [#"Overall Verdict "] = "OUT" then 3 else null, type number),
#"Replaced Value1" = Table.ReplaceValue(#"Added Conditional Column","Out","OUT",Replacer.ReplaceText,{"Overall Verdict "}),
#"Replaced Value2" = Table.ReplaceValue(#"Replaced Value1","In","IN",Replacer.ReplaceText,{"Overall Verdict "}),
#"Replaced Value3" = Table.ReplaceValue(#"Replaced Value2","Just In","JI",Replacer.ReplaceText,{"Overall Verdict "}),
#"Replaced Value4" = Table.ReplaceValue(#"Replaced Value3","Just IN","JI",Replacer.ReplaceText,{"Overall Verdict "}),
#"Removed Columns3" = Table.RemoveColumns(#"Replaced Value4",{"Verdict Score"}),
#"Added Conditional Column1" = Table.AddColumn(#"Removed Columns3", "Custom", each if [#"Overall Verdict "] = "IN" then 0 else if [#"Overall Verdict "] = "OUT" then 3 else if [#"Overall Verdict "] = "JI" then 0.5 else null, type number),
#"Renamed Columns3" = Table.RenameColumns(#"Added Conditional Column1",{{"Custom", "Verdict Score"}}),
This is the related power query M code for the bottom table:
#"Added Conditional Column" = Table.AddColumn(#"Renamed Columns", "Verdict Score", each if [#"Overall Verdict "] = "IN" then 0 else if [#"Overall Verdict "] = "Just IN" then 0.5 else if [#"Overall Verdict "] = "OUT" then 3 else null),
#"Replaced Value" = Table.ReplaceValue(#"Removed Columns","JI","Just In",Replacer.ReplaceText,{"Overall Verdict "}),
#"Replaced Value2" = Table.ReplaceValue(#"Replaced Value1","Out","OUT",Replacer.ReplaceText,{"Overall Verdict "}),
#"Replaced Value3" = Table.ReplaceValue(#"Replaced Value2","In","IN",Replacer.ReplaceText,{"Overall Verdict "}),
@NHW Please try below code, i hope this hepls you!
#"Replaced Value" = Table.ReplaceValue(#"Removed Columns","JI","Just In",Replacer.ReplaceText,{"Overall Verdict "}),
#"Replaced Value2" = Table.ReplaceValue(#"Replaced Value1","Out","OUT",Replacer.ReplaceText,{"Overall Verdict "}),
#"Replaced Value3" = Table.ReplaceValue(#"Replaced Value2","In","IN",Replacer.ReplaceText,{"Overall Verdict "}),
#"Added Conditional Column" = Table.AddColumn(#"Replaced Value3", "Verdict Score", each if [#"Overall Verdict "] = "IN" then 0 else if [#"Overall Verdict "] = "Just IN" then 0.5 else if [#"Overall Verdict "] = "OUT" then 3 else null)
Hi, isn't the below code that you have provided to help the same as the code I am using currently?
Here is a better example of the issue:
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
68 | |
55 | |
42 | |
28 | |
22 |