Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
58 | |
20 | |
19 | |
18 | |
9 |