Forum Discussion

FlatFish's avatar
FlatFish
New Member
4 years ago
Solved

Sharepoint data source column names

Hi everyone,

 

I have two lists from Sharepoint I use to connect to a power BI file and when connected half of the column names come up by the name they are listed as in Sharepoint and the others come up as "field 0, field 1, field 2" etc. Rather than manually change them each time I upload the lists; is there a way for the column names to be uploaded by the names in sharepoint? I understand that the field X names are their actual names.

 

Thank you in advance!

  • Hi FlatFish ,

     

    If you have a Names table that corresponds to the name before and after the modification, then you can use the Table.ToRows function to convert the Names table to a list, and then use this list to rename all columns of the table.

     

     

     

    #"Renamed Columns" = Table.RenameColumns( #"Changed Type", Table.ToRows(Names) )

     

     

     

    Referencing: https://www.youtube.com/watch?v=G40uw2LLMJA&t=615s 

     

    If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
    Best Regards,
    Winniz
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies