Forum Discussion
BNiddrieDavies
3 years agoRegular Visitor
We cannot convert a value of type Function to type Logical IF function
Hello I am trying to put a "List.AnyTrue" function inside an "if" function, but dont know the correct syntax. In the example below, i want to put "addedCustom1" inside "addedCustom"...which i have t...
- 3 years ago
change
each if (F1)=>
to
(F1) => if
BNiddrieDavies
3 years agoRegular Visitor
Just to confirm for other users: formula is now written like the below and works thanks to artemus :
Formula is now written like:
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Je Header Id", Int64.Type}, {"Description", type text}, {"Total", Int64.Type}}),
#"Added Custom" = Table.AddColumn(#"Changed Type", "Basic Pay1", (F1)=> if List.AnyTrue(List.Transform(Basic,each Text.Contains(F1[Description], _)))=true then F1[Total] else 0 )
in
#"Added Custom"