Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Token EOF Error

I am getting a token eof error on this query and I am not sure why. The week variable prints 26 when I run this with out the database part.

 

let
week = Date.WeekOfYear(DateTime.LocalNow())
in
week
let
Source = Odbc.DataSource("dsn=SystemDSN_ELK_PROD", [HierarchicalNavigation=true]),
gsec_Database = Source{[Name="gsec",Kind="Database"]}[Data],
#"data-resilient_Table" = gsec_Database{[Name="data-resilient-all-2020week",Kind="Table"]}[Data]
in
#"data-resilient_Table"

  • lbendlin's avatar
    lbendlin
    6 years ago

    Now what will your query do on Jan 1st 2021? 🙂

10 Replies

  • were you planning to use the week in the calculation further below?

     

    power query can only return one result - you asked it to return two.

    • Anonymous's avatar
      Anonymous
      Not applicable

      OK- I need to use the weeknumber in the table name. I knocked it down and now I get this:

      DataSource.Error: The table has no visible columns and cannot be queried.
      Details:
      data-resilient-all-2020week