Skip to content

Instantly share code, notes, and snippets.

@hgirish
Created August 30, 2024 18:01
Show Gist options
  • Save hgirish/892f46b027e975386b5cbd4657f5bf1f to your computer and use it in GitHub Desktop.
Save hgirish/892f46b027e975386b5cbd4657f5bf1f to your computer and use it in GitHub Desktop.
filter bad date string in M language in Power BI or PowerQuery
# Changed Type1 is previous transformation name
# FilteredDate is new column added
# [Date] is name of column containing dates in text format
= Table.AddColumn(#"Changed Type1", "FilteredDate", each try Value.Is(Date.From([Date]), type date) otherwise false )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment