Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredJoin us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.
Hi all,
I have 2 columns, Clients and their Totals. One client needs to have their total divided by 5.
I made a conditonal column that works, formula: = Table.AddColumn(#"Added Custom", "Custom", each if [Client] = "ABC" then [Total]/5 else [Total])
Althouugh this works, is there a way to select the Total column and do this without creating a new column?
As far as I know the this cannot be done under Transform, Standard operations because I cannot us an each if expression.
Thanks!
Solved! Go to Solution.
Hi @mindfulmike ,
Please try:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTI0VIrVATKdgGwjIyjbGcgxNlaKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Clients = _t, Totals = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Clients", type text}, {"Totals", Int64.Type}}),
Custom1 = Table.FromColumns({Table.ToColumns(#"Changed Type"){0}} & {List.Transform(Table.ToRows(#"Changed Type"), each if _{0}="ABC" then _{1}/5 else _{1})},{"Clients","Totals"})
in
Custom1
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
=Table.ReplaceValue(PreviousStepName,each [Client],5,(x,y,z)=>if y="ABC" then x/z else x,{"Total"})
Hi @mindfulmike ,
Please try:
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclTSUTI0VIrVATKdgGwjIyjbGcgxNlaKjQUA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Clients = _t, Totals = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Clients", type text}, {"Totals", Int64.Type}}),
Custom1 = Table.FromColumns({Table.ToColumns(#"Changed Type"){0}} & {List.Transform(Table.ToRows(#"Changed Type"), each if _{0}="ABC" then _{1}/5 else _{1})},{"Clients","Totals"})
in
Custom1
Best Regards,
Gao
Community Support Team
If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
Table.SelectRows(prevStep, each ([Column1]/5 = 1))
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.