Forum Discussion

ilcaa722's avatar
ilcaa722
Frequent Visitor
3 years ago
Solved

Test if Date is less than Jan 1

i have an embedded Table and want to check if any of the values in a Date column is below a certain date...

 

in the formula in screenshot i get error..." we cannot apply operator < to types List and Number", what would be the correct syntax?

 

thanks

= Table.AddColumn(Source, "Called NovDec", each List.AnyTrue( { [MD_call_Data][Date] < 1/1/2023 } ) )

 

  • Use this

    = Table.AddColumn(Source, "Called NovDec", each List.AnyTrue( List.Transform([MD_call_Data][Date], each _ < #date(2023,1,1))))

1 Reply

  • Vijay_A_Verma's avatar
    Vijay_A_Verma
    Icon for Most Valuable Professional rankMost Valuable Professional

    Use this

    = Table.AddColumn(Source, "Called NovDec", each List.AnyTrue( List.Transform([MD_call_Data][Date], each _ < #date(2023,1,1))))