Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Dear community,
in Power Query I am multiplying a column with 1000:
= Table.TransformColumns(#"Extract 22 ACT & YTD_", {{"Value", each _ * 1000, type number}})
I would like to adjust the expression. If the column "Metric" contains the text values "Pieces" OR "Quantities", the column "Value" should not be multiplied.
Solved! Go to Solution.
Hi @lukmtb08
You cannot add conditional directly in Table.TransformColumns, you can add columns first then delete the original value.
e.g
= Table.AddColumn(#"Extract 22 ACT & YTD_", "Values", each if Text.Contains([Metric], "Pieces") or Text.Contains([Metric], "Quantities") then [Value]*1000 else [Value])
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @lukmtb08
You cannot add conditional directly in Table.TransformColumns, you can add columns first then delete the original value.
e.g
= Table.AddColumn(#"Extract 22 ACT & YTD_", "Values", each if Text.Contains([Metric], "Pieces") or Text.Contains([Metric], "Quantities") then [Value]*1000 else [Value])
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.