Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Any help is appreciated. The Token Literal Expected error message is underlining the "in" line.
Hi @KyleD87
Try replacing the last M codes with below codes. You need to give a name to the last step. Here I name it as #"Filtered Rows 2", you can use any name which hasn't been used in previous steps. And no comma at the end of the last step. Also put the name of last step after "in", then it will return the result of the last step.
#"Removed Duplicates" = Table.Distinct(#"Clear null",{"DATE"}),
#"Filtered Rows 2" = Table.SelectRows(#"Removed Duplicates", each [DATE] >= List.Min(#"Removed Duplicates"[DATE]) and [DATE] <= Date.AddYears(List.Min(#"Removed Duplicates"[DATE]),5))
in
#"Filtered Rows 2"
Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.
Agreed, you need to remove the comma before "in", but you also need to name your last Table.SelectRows statement, like ThisStep = Table.SelectRows(etc.)
in
ThisStep
--Nate
Hey @KyleD87
Looks like your last line of code before the in statement has a comma at the end. Remove the comma. Also, the entire last statement.
Not sure if it'll work that way you may need to change the comma you have seperating the two functions with an and like this:
#"Removed Duplicates" =
Table.Distinct(#"Clear null",{"DATE"}) and
Table.SelectRows(#"Filtered Rows", each [DATE] >= List.Min(#"Filtered Rows"[DATE]) and [DATE]<= Date.AddYears(List.Min(#"Filtered Rows"[DATE], 5)))
in
#"Removed Duplicates"
Proud to be a Super User!