Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Reorder Error Token Comma Expected

Hi Experts,

I had a big list to re-order so I used offline tool and when I copied back, It is throwing Token Comma Expected but to my eyes every thing seem ok, is it possible to see what could be the error 

The error is at "

 

 

 

 

Error is at "IsNTICNConsulted"  and if I remove it, I continue to get error, I am sure you can easily spot the issue. Please can you help me or is there a easy way other than hard way of manually re-arranging them. 

2. Also Can I use this template to rearrange next

  • 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

6 Replies

  • Hi, there are 2 errors:

    - here , "ContractExtendOption, "IsNTICNConsulted",

    there is a wrong character "The character U+201d "" is not a basic ASCII character."

     

    , "ContractExtendOption”, "IsNTICNConsulted",

     

    " instead 

     

    - and here : ,"IsExistingContract", ", "ContractorDocCount", .

     

     

     

    unfortunatly i can't understand the second question

  • 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

  • Anonymous's avatar
    Anonymous
    Not applicable

    serpiva64 and BA_Pete  Thank you very much. I am not sure, how I missed and I am not sure how you could spot it so easily. I am very thankful to you both. I was alerted by my colleague that this may be confidential but I have the solution 🙂 so I will delete if you ok the content. except retaining the error part

    • serpiva64's avatar
      serpiva64
      Solution Sage

      No problem at all. I'm new in the community and i don't know very well the uses. I think i have to ask to click the kudo. I'm glad you solved your problem

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.

    • BA_Pete's avatar
      BA_Pete
      Super User

      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