Forum Discussion
Reorder Error Token Comma Expected
- 4 years ago
Anonymous ,
OMG!
"I'm sure you can easily spot the issue" 🤣
Seriously though.
1) You're trying to reorder your columns twice, in both step #"Reordered Columns" and #"OrderItems". However, your #"OrderItems" step refers to a previous step that doesn't exist:
Fix this first, then see if you still have an issue.
2) In your #"Changed Types" step, you're typing columns as 'any'. I don't think this will fix the issue, just really bad form.
3) The number of columns you're trying to work with is obscene. Try only selecting the initial columns that you need to start out, then add extras in one-by-one as and when you need them. I don't think this will fix the issue, but it will make debugging a nightmare (this post is case in point) if you try and handle the whole table like this from the outset.
Pete
serpiva64 BA_Pete I just fixed the quotes issues in 2-3 places, orphan " and a couple of duplicate items and it worked. But It is a laborious process, isn't it. Is there a smart way of doing it rather than taking it into word and re-ordering them and taking this back into the advanced editor? Thank you both really. It is a great help.
Hi Anonymous ,
1) As per my previous post, your table has way too many columns in it. If possible, break it down into a number of smaller fact tables that each have a seperate theme. This will help make everything you do less laborious.
2) There's not a lot of point rearranging columns in Power Query anyway. Once they're passed to the data model they're organised alphabetically, and you can select them in any order you want to display them in visuals.
3) If you're able to get upstream a bit, you could order the columns how you want at source and they will be received in PQ in the same order. However, based on points 1/2 above, this probably isn't the option to spend much/any time on.
Pete