How to Get and add Power Query Table name in column

%3CLINGO-SUB%20id%3D%22lingo-sub-2281542%22%20slang%3D%22en-US%22%3EHow%20to%20Get%20and%20add%20Power%20Query%20Table%20name%20in%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2281542%22%20slang%3D%22en-US%22%3E%3CP%3EHi%20All%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20imported%20data%20from%20multiple%20files%20data%20from%20multiple%20locations%20from%20SharePoint%20site.%3C%2FP%3E%3CP%3EEx%20table%20names%20are%20%3A%20Year%202015%2C%26nbsp%3BYear%202016%2C%26nbsp%3BYear%202017%20........%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ENow%20I%20want%20to%20add%20a%20new%20column%20in%20respective%20tables%20names.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECan%20anybody%20suggest%20me%20%2C%20if%20there%20is%20any%20workaround%20or%20custom%20M%20code%20%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2281542%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2281871%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Get%20and%20add%20Power%20Query%20Table%20name%20in%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2281871%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F94790%22%20target%3D%22_blank%22%3E%40Rajender%20Singh%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EAfraid%20you%20can't%20get%20current%20query%20name.%20However%2C%20querying%20SharePoint%20lists%20I%20guess%20you%20use%20parameters%20to%20define%20list%20name%2C%20why%20don't%20use%20the%20same%20parameter%20to%20add%20new%20column%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2281740%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Get%20and%20add%20Power%20Query%20Table%20name%20in%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2281740%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F521%22%20target%3D%22_blank%22%3E%40Sergei%20Baklan%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20Example%20%3A%20Here%20I%20have%203%20query%20tables%20%2C%20and%20now%20I%20want%20to%20add%20a%20new%20column%20with%20these%20query%20names%20in%20all%203%20Query%20tables.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ERight%20now%20I%20am%20adding%20manually%20adding%20these%20Query%20table%20names%2C%20but%20looking%20for%20a%20dynamic%20solution%20if%20we%20can%20add%20%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Query%20Name.JPG%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F274748i814FCA2E61E86D8B%2Fimage-size%2Flarge%3Fv%3Dv2%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Query%20Name.JPG%22%20alt%3D%22Query%20Name.JPG%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2281554%22%20slang%3D%22en-US%22%3ERe%3A%20How%20to%20Get%20and%20add%20Power%20Query%20Table%20name%20in%20column%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2281554%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F94790%22%20target%3D%22_blank%22%3E%40Rajender%20Singh%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENot%20sure%20I%20understood%20the%20question.%20There%20is%20%3CSTRONG%3EAdd%20custom%20column%3C%2FSTRONG%3E%20in%20the%20menu.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Occasional Contributor

Hi All,

 

I have imported data from multiple files data from multiple locations from SharePoint site.

Ex table names are : Year 2015, Year 2016, Year 2017 ........

 

Now I want to add a new column in respective tables names. 

 

Can anybody suggest me , if there is any workaround or custom M code ?

 

 

3 Replies

@Rajender Singh 

Not sure I understood the question. There is Add custom column in the menu.

@Sergei Baklan 

 

For Example : Here I have 3 query tables , and now I want to add a new column with these query names in all 3 Query tables. 

 

Right now I am adding manually adding these Query table names, but looking for a dynamic solution if we can add ? 

Query Name.JPG

@Rajender Singh 

Afraid you can't get current query name. However, querying SharePoint lists I guess you use parameters to define list name, why don't use the same parameter to add new column?