Forum Discussion
How to duplicate "Calculated Table"
Hi Gurus!,
I need to duplicate a calculated table, where I have maybe 30 calculated columns. I need to create the same table but with little differences (Little changes on DAX). Then I do not want to copy paste all the "code" of columns again to create a new calculated table. Calculated tables are not editables using "Query Editor". Is possible to do that?
Regards,
6 Replies
- parry2k
Super User
You have to basically copy your dax expression and make the changes, i don';t think there is a way to duplicate it.
Or if possible, create table in power query and then duplicate within power query which you mentioned.
- erickparraFrequent Visitor
Hi,
Thanks for your time, but is not possible the access to the query editor for calculated tables.
I'm not sure if I can solve the problem with your solution.
Regards,
- barooahrRegular Visitor
Hi erickparra , Did you happen to find a solution to copy/paste calculated tables? I need to create few duplicates of a calculated table alongwith their measures and tweak the DAX codes. I agree with you the query editor doesn't show the calculated values. Kindly let me know if you have any updates to this problem. Thanks.
- SWegenerRegular Visitor
Hi,
how about the following approach?
- Create a new calculated table.
- Insert the following line into the editor:
CopyOfMyCalculatedTable = MyCalculatedTable - Adjust the DAX expressions in table CopyOfMyCalculatedTable according to your needs.
Greetings
SW
- erickparraFrequent Visitor
Hi,
Thanks for your time, but duplicate the same table is not the solution to the given problem.
I mean to create a new indepent table keeping the same formulas for every column based in other calculated table.
In other words, to create a new calculated table with several columns for similiar task. I need to copy column by column formulas.
Regards,
- PaulDBrown
Community Champion
I think what SWegener and parry2k were referring to was to use DAX to duplicate the table.
See this example:
And then the Duplicate:
OR, you can copy the DAX from the Calculated table and alter the output directly in the DAX, as in:
Where I've changed the caculation ouputs in each column
If however you need to change the DAX in calculated columns included in a calculated table then I'm out of ideas, except the good old copy and paste.
Just out of curiosity, why the need to duplicate a table and alter some DAX? can't you use measures instead?