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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Add Query Name as a Column

I have below queries in my dataset. I need to add a column with value as the query name in both the queries.

 

Query.PNG

 

For Instance, Query1 has below tables:

Table1.PNG

 

And I need to add a column as below:

 

Table2.PNG

 

Is there any option to add custom column like this? Please help me.

 

7 REPLIES 7
ChrisMendoza
Resident Rockstar
Resident Rockstar

Did you try https://radacad.com/get-list-of-queries-in-power-bi ?






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



Anonymous
Not applicable

@selimovd @Ashish_Mathur can you help me here?

selimovd
Super User
Super User

Hey @Anonymous ,

 

yes, that's easily managable.

Go to Power Query to your Query1, then choose "Add Column" --> "Custom Column" and then add the Text "Query1":

selimovd_0-1637069996001.png

 

Afterwards the column will appear in your table.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
VBVB
Frequent Visitor

Just what I needed it 🙂 thank you very much!
Anonymous
Not applicable

Hello, Thanks for your reponse. 

Sorry, I need to be more clear on my requirement. My Query name is dynamic, Everytime, its not possible to go and change the text in the Custom column step.

Instead I need a step to add the name of the Query name.

@Anonymous  then tell us where you get the dynamic name from and I might find a solution.

By the way, if you answer always mark people with an @- Symbol. Otherwise I will not be informed about the new reply.

Anonymous
Not applicable

the dynamic name is the Query name only. I need to get the Query name as a column values.

is there any custom column functions to get the required output. Please refer to the images attached in the initial query.

Helpful resources

Announcements
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.