Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.

A PowerQuery (M) function that returns the name of currently executing query

It would be awesome if one could retrieve the name of the current query using a M-function. If this were possible, then one could potentially duplicate queries, rename them and it would automatically load the data.


As an example:

  1. Loading an excel file using the name of the query (eg: Query is called MyDataFile. The name would be retrieved, concatenated into the path and a file named "myDataFile.xlsx" would be opened)
  2. Loading a CRM entity. The query would be named with its entity: Account, Contact, etc. The code would automatically pull the name and then load the right entity.


It would make life so much easier when we have to use the same data-source and retrieve different entities. Today, we duplicate the query, edit its code to point at the right file/entity/etc and move on. If such a function were available, we would duplicate the query, fix its name and voila, the data would be available.

Status: New
Comments
fbcideas_migusr
New Member
Status changed to: New