none
Power Query M Language not working in Excel 2016 RRS feed

  • Question

  • I have an Excel 2016 workbook that has the following line the a query:

    if Date.DayOfWeekName([Status Date]) = "Monday" then Date.AddDays([Status Date],-1) else Date.EndOfWeek([Status Date],Day.Monday)

    It works fine in Excel 2013.  When I try to run in Excel 2016, I get an expression error telling me the name 'Date.DayOfWeekName' wasn't recognized.  Make sure it's spelled correctly.  It is spelled exactly the same in the Power Query M Reference.

    Why is it not working in Excel 2016?

    Tuesday, May 8, 2018 6:49 PM

Answers

  • Hey!

    This might because of a really old version of Exce/Power Query that doesn't have that function. If you don't have Office 365 and you bought Office either through retail or volume licensing then you're most likely using a really old version of Excel 2016. If you do have an Office through Office 365, then you should be able to see that function.

    Please let us know what version of Excel 2016 you're using.

    Best!

    Wednesday, May 9, 2018 9:33 AM

All replies

  • Hello JSkoog,

    This forum(Excel for Developers) is for development issues related to Excel Object Model and your problem is more related to Power Query, so I would move this thread into Power Query forum.
    Thanks for your understanding.
    Best Regards,
    Terry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 9, 2018 2:15 AM
  • Hey!

    This might because of a really old version of Exce/Power Query that doesn't have that function. If you don't have Office 365 and you bought Office either through retail or volume licensing then you're most likely using a really old version of Excel 2016. If you do have an Office through Office 365, then you should be able to see that function.

    Please let us know what version of Excel 2016 you're using.

    Best!

    Wednesday, May 9, 2018 9:33 AM
  • you can check the list of all available functions with:
    #shared
    just create a new query and paste it in the formula bar

    Wednesday, May 9, 2018 10:04 AM