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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
asbpowerbi
Helper IV
Helper IV

PowerBI Desktop - duplicate a table including all DAX

Hello Friends,

 

  I have a PowerBI desktop report, that has a number of tables. One of the tables contains a little data, but a lot of Dax columns and measures. I want to 1: create a duplicate of this table in the same report project, and 2: explort the table so that I can use it in other report projects. When I duplicate the table using PowerQuery, it does not duplicate all the DAX. When I view the table in table View, and right mouse click on it; I do see a Copy Table option, but no duplucate ever gets created. Any suggestions?

 

Cheers!

 

Peter

1 ACCEPTED SOLUTION
123abc
Community Champion
Community Champion

In Power BI Desktop, duplicating a table along with its DAX columns and measures can be a bit tricky, as there is no direct built-in feature to do this. However, you can achieve this by creating a new table that references the original table's columns and measures. Here are the steps to duplicate a table with its DAX columns and measures:

  1. Create a Duplicate Table:

    You can create a duplicate table by going to the Power Query Editor. Follow these steps:

    • Click on "Edit Queries" in the Home tab.
    • Locate your table in the Power Query Editor.
    • Right-click on the table you want to duplicate.
    • Select "Duplicate."

    This will create a copy of the table within the Power Query Editor.

  2. Rename the Duplicate Table:

    After duplicating the table, make sure to rename it to something unique. Right-click on the duplicate table and select "Rename."

  3. Adjust DAX Columns and Measures:

    To duplicate the DAX columns and measures associated with the original table, you will need to recreate them in the new duplicate table. You can copy the DAX formulas from the original table and paste them into the new table.

    • Go to the Data view in Power BI Desktop.
    • Click on the duplicate table to select it.
    • In the Modeling tab, you can create new DAX columns and measures by entering the DAX formulas manually.
  4. Export the Duplicate Table:

    To export the duplicate table for use in other report projects, you can save the Power BI Desktop file or export it as a template:

    • Save the current Power BI report.
    • You can then share the .pbix file with others. When they open the file in their Power BI Desktop, they will have access to the duplicate table with its DAX columns and measures.

Please note that while this method allows you to duplicate the table and its DAX logic within the same report, exporting it for use in other report projects will require sharing the entire .pbix file, and users will need access to the same data source to make it functional.

Remember to update the DAX calculations in the duplicated table as needed, as they may reference specific columns or measures from the original table.

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
123abc
Community Champion
Community Champion

In Power BI Desktop, duplicating a table along with its DAX columns and measures can be a bit tricky, as there is no direct built-in feature to do this. However, you can achieve this by creating a new table that references the original table's columns and measures. Here are the steps to duplicate a table with its DAX columns and measures:

  1. Create a Duplicate Table:

    You can create a duplicate table by going to the Power Query Editor. Follow these steps:

    • Click on "Edit Queries" in the Home tab.
    • Locate your table in the Power Query Editor.
    • Right-click on the table you want to duplicate.
    • Select "Duplicate."

    This will create a copy of the table within the Power Query Editor.

  2. Rename the Duplicate Table:

    After duplicating the table, make sure to rename it to something unique. Right-click on the duplicate table and select "Rename."

  3. Adjust DAX Columns and Measures:

    To duplicate the DAX columns and measures associated with the original table, you will need to recreate them in the new duplicate table. You can copy the DAX formulas from the original table and paste them into the new table.

    • Go to the Data view in Power BI Desktop.
    • Click on the duplicate table to select it.
    • In the Modeling tab, you can create new DAX columns and measures by entering the DAX formulas manually.
  4. Export the Duplicate Table:

    To export the duplicate table for use in other report projects, you can save the Power BI Desktop file or export it as a template:

    • Save the current Power BI report.
    • You can then share the .pbix file with others. When they open the file in their Power BI Desktop, they will have access to the duplicate table with its DAX columns and measures.

Please note that while this method allows you to duplicate the table and its DAX logic within the same report, exporting it for use in other report projects will require sharing the entire .pbix file, and users will need access to the same data source to make it functional.

Remember to update the DAX calculations in the duplicated table as needed, as they may reference specific columns or measures from the original table.

 

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

CoreyP
Solution Sage
Solution Sage

May I ask the reason why you want to duplicate the table? Additionally, in terms of exporting the table to use in other reports.. if this report is published, you can connect directly to it from a different power bi report and build using the data contained within the dataset. Might be a better option than exporting the data and importing into another file. 

christinepayton
Super User
Super User

In the "modeling" tab, use "New table" and for the expression set the table to be equal to the table you want to copy. It's not in PQ, so it takes all your DAX calculated columns (but not measures since measures aren't truly part of the table). 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel

Power BI Monthly Update - May 2024

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

LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.