When I download your query and it was running successfully.
Then I copied exact query by using Alteryx 10.4 version since this is the one my company is using now, I got the following error message in the Generate Rows tools
Parse error at char (0); unknown variable "allweek"
Could you please advise what's wrong with it? I just dragged the Generate Rows tools and typed exact what you typed in your query....... because of this error, I even can't run the query to pass the appendent tool.