Forum Discussion
Token Eof expected
I've read the other posts about this topic but can't seem to rectify my error. Any help is appreciated!
I'm getting the Token Eof expected in the following, the error highlights the comma after 'Grouped Rows' but when I delete it, the error moves to highlight the 'Added Conditional Column'.
in
#"Grouped Rows",
#"Added Conditional Column" = Table.AddColumn(Table1, "New C1 Date", each if [Contact 1 Date] = null then [New Contact Date] else if [Contact 1 Date] = """""" then [New Contact Date] else if [Contact 1 Date] = "" then [New Contact Date] else [Contact 1 Date]),
#"Added Conditional Column1" = Table.AddColumn(#"Added Conditional Column", "New C1 Type", each if [Contact 1 Date] = null then [New Contact Type] else if [Contact 1 Date] = "" then [New Contact Type] else [Contact 1 Type]),
#"Added Conditional Column2" = Table.AddColumn(#"Added Conditional Column1", "New C1 Response", each if [Contact 1 Date] = null then [New Contact Response] else if [Contact 1 Date] = "" then [New Contact Response] else [Contact 1 Response]),
#"Added Conditional Column3" = Table.AddColumn(#"Added Conditional Column2", "New C2 Date", each if [Contact 1 Date] <> [New Contact Date] and [New C1 Date] <> [New Contact Date] and [Contact 2 Date] = "" and [New C1 Date] <> "" then [New Contact Date] else [Contact 2 Date]),
Thank you in advance for your help!
LaurenHS The normal syntax for a query is something like:
let #"Added Conditional Column" = Table.AddColumn(Table1, "New C1 Date", each if [Contact 1 Date] = null then [New Contact Date] else if [Contact 1 Date] = """""" then [New Contact Date] else if [Contact 1 Date] = "" then [New Contact Date] else [Contact 1 Date]), #"Added Conditional Column1" = Table.AddColumn(#"Added Conditional Column", "New C1 Type", each if [Contact 1 Date] = null then [New Contact Type] else if [Contact 1 Date] = "" then [New Contact Type] else [Contact 1 Type]), #"Added Conditional Column2" = Table.AddColumn(#"Added Conditional Column1", "New C1 Response", each if [Contact 1 Date] = null then [New Contact Response] else if [Contact 1 Date] = "" then [New Contact Response] else [Contact 1 Response]), #"Added Conditional Column3" = Table.AddColumn(#"Added Conditional Column2", "New C2 Date", each if [Contact 1 Date] <> [New Contact Date] and [New C1 Date] <> [New Contact Date] and [Contact 2 Date] = "" and [New C1 Date] <> "" then [New Contact Date] else [Contact 2 Date]) in #"Added Conditional Column3"
2 Replies
- Greg_DecklerCommunity Champion
LaurenHS The normal syntax for a query is something like:
let #"Added Conditional Column" = Table.AddColumn(Table1, "New C1 Date", each if [Contact 1 Date] = null then [New Contact Date] else if [Contact 1 Date] = """""" then [New Contact Date] else if [Contact 1 Date] = "" then [New Contact Date] else [Contact 1 Date]), #"Added Conditional Column1" = Table.AddColumn(#"Added Conditional Column", "New C1 Type", each if [Contact 1 Date] = null then [New Contact Type] else if [Contact 1 Date] = "" then [New Contact Type] else [Contact 1 Type]), #"Added Conditional Column2" = Table.AddColumn(#"Added Conditional Column1", "New C1 Response", each if [Contact 1 Date] = null then [New Contact Response] else if [Contact 1 Date] = "" then [New Contact Response] else [Contact 1 Response]), #"Added Conditional Column3" = Table.AddColumn(#"Added Conditional Column2", "New C2 Date", each if [Contact 1 Date] <> [New Contact Date] and [New C1 Date] <> [New Contact Date] and [Contact 2 Date] = "" and [New C1 Date] <> "" then [New Contact Date] else [Contact 2 Date]) in #"Added Conditional Column3" - LaurenHSNew Member
Thank you so much!