Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
10 years ago

Copy and Paste a Query

Hi,

 

I have a query from SQL Source in my fileds area of Power BI desktop.

I created lot of Measure on that query.

I want to duplicate the query with all the measures i have created.(so that i go to its source and i will just change the year filter).

I can see the copy table option but i am unable to paste it.

How to paste it in the same PBIX with all the measures created...??

 

Thanks in advance

8 Replies

  • MattAllington's avatar
    MattAllington
    Community Champion

    You can copy a table and columns in a query, but you can't copy DAX measures stored in a table by copying the table. 

    • Anonymous's avatar
      Anonymous
      Not applicable

      well that is a pity to me:mansad:

    • CahabaData's avatar
      CahabaData
      Memorable Member

      in my PBI desktop; when in Data view; the tables list on right allow right click and 'copy table'......but I can't see anywhere/any way to paste.  In open space on the right frame there is no action and the paste icon in ribbon is inactive.

       

      what am I missing?

       

      no problem in copying queries when in Edit Query screen.... these data tables that I can not copy discussed above are actually queries....  so if that is the reason why they cannot copy/paste in the Data view - - what table can copy/paste?  only that which has not had a query applied to it?

       

      • Anonymous's avatar
        Anonymous
        Not applicable

        What i think is even when we try to create a measure with the same name in other queries in our PBI Desktop it won't allow.

        if we consider that, then if we want to copy a table we are going to copy with measures(whicih actually leads to create a copy of a query with the same Measure names and column names) which should not happen and so we are unable to paste it.

        But its happening at query editor cus derz no option to define calculated measures at query level except a custom column So we can duplicate a query in query editor. (I guess) 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous, CahabaData

    In Data View of Power BI Desktop, after you right-click the table and select “Copy Table”, you can paste it by using “Enter Data” in the Home tab. Alternatively, you can duplicate the query in Query Editor.

    Besides, as other post, we are not able to copy measures. Regarding to this issue, you can vote it in the following idea.
    https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/13219620-duplicate-measure-and-format-copy

    Thanks,
    Lydia Zhang

    • jadewind's avatar
      jadewind
      Advocate I

      Thank you so much Lydia! Following your instruction I just discovered that I can copy a table from Power BI to Excel. This has solved a huge problem that I have been facing!