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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
spaturu3234
Frequent Visitor

Export the data from tabular model

In tabular model I have more than one table, and they have relation

 

In each table I have created a features/flags 

 

How Do I extract those features/ flags with key by maintiang the relation to sql server database ?

 

Ex:

Table1 - Key, Flag1,Flag2

Table 2 - Key, Fkey, Flg3,Flg4,Flg5

Table 3 - Key, Fkey, Flg6, FLg7,FLg8

 

 

My Output :

Key, Flg1,Flg2,FLg3,Flg4,Flg5,Flg6

In a database

1 ACCEPTED SOLUTION
v-sihou-msft
Microsoft Employee
Microsoft Employee

@spaturu3234

 

You can use R script to write the data fields into a file. Please please refer to links below:

 

Use R to export data from Power BI (and Power Query)
Exporting data using R

 

Then, still use R script the execute bulk insert to database from that file. See: How to quickly export data from R to SQL Server.

 

Regards,

View solution in original post

2 REPLIES 2
v-sihou-msft
Microsoft Employee
Microsoft Employee

@spaturu3234

 

You can use R script to write the data fields into a file. Please please refer to links below:

 

Use R to export data from Power BI (and Power Query)
Exporting data using R

 

Then, still use R script the execute bulk insert to database from that file. See: How to quickly export data from R to SQL Server.

 

Regards,

malagari
Continued Contributor
Continued Contributor

There's no way to directly export information from Power BI (or a Tabular Model) to a SQL Server database without some intermediate step.

 

You could pull Flg3, Flg4, Flg5, Flg 6, Flg7, and Flg8 into Table1 and then export that, which will be easier to import into SQL Server.   Assuming that the foreign keys in Table2 and Table3 are pointing to Table1, you can make use of the RELATED() and USERELATIONSHIP() DAX functions to pull this information in.

Dan Malagari
Consultant at Headspring

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors