Forum Discussion
Custom column based on whats contained in a row
- Anonymous1 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
- 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.
Hi jcastr02 ,
I've made a test for yor reference:
if List.ContainsAny(Record.FieldValues(_), {"*00:00"}) then "Yes" else "No"
Best Regards,
Bof
Apologies, I should have clarified - what if I Only wanted to check within this table for specific columns, such as FE Sat Open and FE Sat Close (as example) - how could I tailor to list out the specific columns?
- Anonymous1 year agoNot applicable
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
- jcastr021 year ago
Post Prodigy
Hello Anonymous Thanks so much. I tried to enter this , however getting different answers when the values are the same in the rows. Any ideas? Thanks so much.
- AntrikshSharma1 year ago
Community Champion
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.