Forum Discussion

jcastr02's avatar
jcastr02
Post Prodigy
1 year ago
Solved

Custom column based on whats contained in a row

I was trying to create a custom column in power query (a yes/no column is fine)   that if any of the values in the row contains *00:00, the FE Yes/No column would be "No, if not then "Yes"  see below...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi jcastr02 ,

     

    Please try:

    = Table.AddColumn(#"Changed Type", "Custom", each if List.ContainsAny({Record.Field(_, "FE Sat Open"), Record.Field(_, "FE Sat Close")}, {"*00:00"}) then "Yes" else "No")

     

    Best Regards,

    Bof

  • AntrikshSharma's avatar
    AntrikshSharma
    1 year ago

    Create a new step by clicking FX button and then paste that code in Editor, what you're doing is pasting the code in a custom column.