Forum Discussion
Adean7
Jul 08, 2022Copper Contributor
Power Query - Multiply by % if Descriptions column contains certain phrases
Hi
I am looking for a calc that multiplies my cost column by 3% if my description column contains one of the below phrases, if it does not then it does not multiply.
| Labour |
| Subcontract |
| Plant |
| Materials |
any help much appreciated
2 Replies
- SergeiBaklanDiamond Contributor
As variant
let Source = Excel.CurrentWorkbook(){[Name="Tabelle1"]}[Content], words = {"plant", "materials", "subcontract", "labour" }, adjustCost = Table.AddColumn( Source, "new cost", each if List.ContainsAny( Text.Split([description], " "), words ) then [cost] else [cost]*1.03, type number ) in adjustCost - OliverScheurichGold Contributor