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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
OSC
Frequent Visitor

Export Table definition and Custom Columns to another PBIX

Hello Community,

I have looked around but did not find a proper answer to how I could move the Table definition and its subsequent Custom Columns from one pbix to another...

 

The only similar question / answer was about the Query (Advanced editor code) but I am not talking about M/Query...

What I am talking about is the Modeling->New Table and consequently  New Column(s) with all the DAX code.

To give you the context: I am working on the model (on PB Desktop) and I am publishing to service. Recently, a new junior moved in and I was showing him the model on a copy on his computer (PB Desktop) and we ended up creating new table and a lot of calculations. Well, those I would like to move into my "official" model file to be able to carry on. 

And NOT by hand copy-paste every bit of DAX written (as I do now in NotePad++)

 

Thanks for your help!

Cristian

6 REPLIES 6
bihumano
Frequent Visitor

run this on Data Studio:

 

--All Cubes in database
SELECT [CATALOG_NAME] AS [DATABASE],CUBE_CAPTION AS [CUBE/PERSPECTIVE],BASE_CUBE_NAME
FROM $system.MDSchema_Cubes
WHERE CUBE_SOURCE=1
 

--All Attributes
SELECT [CATALOG_NAME] as [DATABASE];
CUBE_NAME AS [CUBE];[DIMENSION_UNIQUE_NAME] AS [DIMENSION];
HIERARCHY_DISPLAY_FOLDER AS [FOLDER];HIERARCHY_CAPTION AS [DIMENSION ATTRIBUTE];
HIERARCHY_IS_VISIBLE AS [VISIBLE]
FROM $system.MDSchema_hierarchies
WHERE CUBE_NAME ='Model'
AND HIERARCHY_ORIGIN=2
ORDER BY [DIMENSION_UNIQUE_NAME]

 

 

found more on this link : https://bennyaustin.com/2011/03/01/ssas-dmv-queries-cube-metadata/

v-yuta-msft
Community Support
Community Support

@OSC ,

 

You don't need to copy the dax formulas one by one. You can create a power bi template file(.pbit) and share the template file to your team mate so that your team mate can create another report based on your template.

 

Please read the blog below:

https://www.powerbitutorial.org/tutorials/power-bi-templates/#targetText=Power%20BI%20Templates%20ar...

 

Community Support Team _ Jimmy Tao

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

Hello @v-yuta-msft 

 

Thank you for your reply. I followed and read the link provided, somehow informative (I knew some of the info presented there).

 

However, it doesn't asnwer my  question/issue... I am afraid you haven't read my context, or I haven't explained my self well...

 

I do not want to export everything... I am managing an "official" PBIX and someone else has created ONE table (as part of training/induction), with a lot of calculated columns that eventually we found useful and decided to include inside the official .pbix.

 

So, I would like to export that table (or 2-3 for that matter, but not all 50+) definition, in order not to rewrite the DAX or copy-paste by hand between the 2 pbix files... Conversly, i might want to give him some additional work, ie 1-2 new tables, withouth resharing the whole file, especially as he might have done its own definitions.

 

I've also looked inside the pbit as a zip file, reading DataModelSchema as a json, but can't find a straitforward way to locate/isolate that table definition.

 

So, to summarize, I was looking for Export-Import as with the templates, but for a specific table definition with all its custom fields.

 

Many thanks,

Cristian

 

 

 

 

 

 

 

 

OSC
Frequent Visitor

Nobody...?

 

Not even at least a reply like "No, you can not do it" ...?

 

OSC
Frequent Visitor
OSC
Frequent Visitor

...PS.

 

or, either like an SQL DDL Script or in PBI, Advanced editor in Query, from where you can copy ALL the defintions steps, columns (added, deleted, modified), so basically you can recreate the structure

 

Cristian

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.