Forum Discussion

kido117's avatar
kido117
Regular Visitor
2 years ago

Datetime Filtered to DateTime.LocalNow() shows 'This Table is empty' in PQE

I replaced the null values in DateTime column with the M formula in PQE:

= Table.ReplaceValue(#"Replaced Value",null,DateTime.LocalNow(),Replacer.ReplaceValue,{"Resolution time"})


When I filtered the column to todays date as shows in formula:
= Table.SelectRows(#"Replaced Value1", each ([Resolution time] = #datetime(2024, 5, 16, 19, 3, 31.0258814)))

I get "This Table is empty". The filtering works for other datetime values though.

1 Reply

  • HotChilli's avatar
    HotChilli
    Community Champion

    Did you write this out or did you use the interface to generate the value of the datetime?

    I think the obvious conclusion is that you don't have any values in the table that equal that value.

    -

    There is a handy function Date.IsInCurrentDay which you could use.