Forum Discussion
shabby010
3 years agoNew Member
Expression.Error: We cannot apply field access to the type Number. Details: Value=1 Key=Cust
and this is the query i am using = Table.AddColumn(#"Replaced Value", "TotalFirstInvoice", each if [Custom.Index] = 1 [Custom.Type] <> "Revenue" then [Custom.Invoice Value] else 0)
lbendlin
3 years agoSuper User
are you missing the "and" keyword?
= Table.AddColumn(#"Replaced Value", "TotalFirstInvoice", each if [Custom.Index] = 1 and [Custom.Type] <> "Revenue" then [Custom.Invoice Value] else 0)
- shabby0103 years agoNew Member
No i used the and operator
= Table.AddColumn(#"Replaced Value", "TotalFirstInvoice", each if [Custom.Index] = 1 & [Custom.Type] = " Revenue " then [Custom.Invoice Value] else 0)
- lbendlin3 years agoSuper User
there is no "and operator" in Power Query. The & sign is used to concatenate objects. You need to use the actual word "and" for conditionals.