Forum Discussion
Mic1979
1 year agoPost Partisan
Cells Offset
Dear all, I need to shift the cells on the right in my workload. The idea is this: 1. I need to check what stored is in the column "Name". 2. If in the cells of the column "Name" I have the...
- 1 year ago
OffsetLabour = ((cols) => Table.SplitColumn( Table.CombineColumns( #"Changed Type1", cols, (x) => if Text.Contains(x{0}, "Labour") then {x{0}, x{2}, x{1}} else x, "combined" ), "combined", (x) => x, cols ))({"Name", "Part Number", "Labour Cost (MATURE)"})
Mic1979
1 year agoPost Partisan
Thanks for your suggestions.
In the meatime, i made the following:
OffsetLabour = Table.FromRecords(
Table.TransformRows(#"Added Custom",
(r)=> Record.TransformFields(
r,
{
{"Labour Cost (MATURE)", each if Text.Contains(r[Name],"Labour") then r[#"Part Number"] else null},
{"Part Number", each if Text.Contains(r[Name],"Labour") then null else _}
}
)
)
),