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
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
Employee
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
Employee
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
Responsive Resident
Responsive Resident

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
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.

Top Solution Authors