Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Why this Power Query does not work?

Hello

 

Any idea why the Power Query below does not work?

 

#"Filter Today" = Table.Join(Table.TransformColumnTypes(Table.FromRecords({[Date = FormatDateTime.Date(DateTime.LocalNow())],[Date = Date.AddDays(DateTime.Date(DateTime.LocalNow()),-1)]}), {{"Date", type date}}, "en-US"), "Date", #"Changed Type", "Date"),

 

Thanks!

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous 

     

    As AlexisOlson mentioned, you need to replace FormatDateTime.Date() with DateTime.Date()

     

     

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

     

    As AlexisOlson mentioned, you need to replace FormatDateTime.Date() with DateTime.Date()

     

     

     

    Best Regards,
    Eyelyn Qin
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.