Share via

powerquery M language function to get current query name

Anonymous
2023-06-08T12:23:48+00:00

I need to but cannot find a way to fill a column with the name of the current query which happens to be the name of an excel table and also the name of the sheet on which that table sits. I load the table into powerquery and it gets named after the table which is then referenced as the first source row using Excel.Currentworkbook...

There seems no code method to do this and I have to manually type in the name of the query based on my search of others who have attempted similar eg https://community.fabric.microsoft.com/t5/Desktop/Refer-to-current-Query-Name-in-formula/m-p/446665

Chatgpt kept suggesting functions that are not available (seemed to be bluffing) and so was useless.

If there was one query that would be ok but I have a many new queries every day and want to automate as much as possible. At present I create the query based on the table and then copy and paste several rows of code into the query using the Advanced Editor.

This seems a major and basic gap in power query M language capability.

How can this be requested as a new feature? Unless that is you can show me a way to do this.

Microsoft 365 and Office | Excel | For business | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2023-06-08T14:06:56+00:00

    Was this answer helpful?

    0 comments No comments