Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

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.

 

 

For Instance, Query1 has below tables:

 

And I need to add a column as below:

 

 

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

 

7 Replies

  • selimovd's avatar
    selimovd
    Most Valuable Professional

    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":

     

    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
     
    • Anonymous's avatar
      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.

      • selimovd's avatar
        selimovd
        Most Valuable Professional

        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.

    • VBVB's avatar
      VBVB
      Frequent Visitor
      Just what I needed it 🙂 thank you very much!