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
gidon
Helper II
Helper II

binary and connect pbix file to new pbix model

Hello

 

i have a pbix model which is steady  base.pibx  .

i want to start new model ( power bi doc )  data.pbix

 

i want to strat with the base model , so i have all my base tables ready .

 

in qlik we used binary connect

 

thanks

gidon

 

 

1 ACCEPTED SOLUTION

Hi @gidon,

 

>>i have a batch file that run sequese of qlik documents that , doc2  bianaty connect to doc1 , doc3  connect to doc2

doc1 will have all basic tables ready , doc2 will bring Invoices line transactions doc3 will bring stock transactions .

 

I have a idea to solve your issue, you can store other config to xml file,connect to this xml file and analysis xml to connect other databases, then save it as a template(this method is from @suvaries). You can use this template to connect the dynamic databases.(change the config xml to change connected database.)

 

For example(use xml config file to connect sqlserver).

 

power query:

 

let
    configPath = "C:\...\Desktop\config.xml",
    Source = Xml.Tables(File.Contents(configPath)),
    Table0 = Source{0}[Table],
    #"Changed Type" = Table.TransformColumnTypes(Table0,{{"server", type text}, {"database", type text}}),
    Table1 = #"Changed Type"{0},
    server= Table1[server],
    db = Table1[database],
    databaseCon = Sql.Database(server, db),
    dbo_xxx = databaseCon{[Schema="dbo",Item="xxx"]}[Data]
in
    dbo_xxx

 

 

config file:

<root>
  <connection>
    <server>localhost</server>
    <database>dbxxx</database>
  </connection>
</root>

 

 

Notice: you can also store the path of other config file which use to connect the database.

 

<files>
  <list>
    <config1>C:\...\Desktop\config1.xml</config1>
    <config2>C:\...\Desktop\config2.xml</config2>
    <file1>D:\...\file1.txt</file1>
  </list>
</files>

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

7 REPLIES 7
Greg_Deckler
Super User
Super User

I believe you want to save your base.pbix as a template file. You can then use the template file to create the data.pbix file.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Hi

It is something like a templet

the base.pbix will be basic tables of erp system like

part , categoies , customers , suppliers and more

data will invoices , orders

and more , in qlik do it all the times , is make delepment  better and easier .

 

so can it be done , and how ?

 

thanks

gidon

 

Hi

can it be done ?

gidon

Hi @gidon,

 

As smoupre's said, you can save the base pbix file as a template.

 

1. Click on "file", choose "Save As".

Capture.PNG

 

2. Choose the template type to save.

Capture2.PNG

 

Regards,
Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

I  Xiaoxin

 

I understand , templet is a documnet , that you load to new document and bring all queries  .

 

But I need better than that I Come fro qlikview world , there is a great feature that

binary connect a document  to another document , it does not load again all the  queries  .

 

i have a batch file that run sequese of qlik documents that , doc2  bianaty connect to doc1 , doc3  connect to doc2

doc1 will have all basic tables ready , doc2 will bring Invoices line transactions doc3 will bring stock transactions .

 

so it is not really template  ,  it is great for developers  and debug

 

in qlik it is called binary connect

thanks for the help

 

gidon

 

 

 

Hi @gidon,

 

>>i have a batch file that run sequese of qlik documents that , doc2  bianaty connect to doc1 , doc3  connect to doc2

doc1 will have all basic tables ready , doc2 will bring Invoices line transactions doc3 will bring stock transactions .

 

I have a idea to solve your issue, you can store other config to xml file,connect to this xml file and analysis xml to connect other databases, then save it as a template(this method is from @suvaries). You can use this template to connect the dynamic databases.(change the config xml to change connected database.)

 

For example(use xml config file to connect sqlserver).

 

power query:

 

let
    configPath = "C:\...\Desktop\config.xml",
    Source = Xml.Tables(File.Contents(configPath)),
    Table0 = Source{0}[Table],
    #"Changed Type" = Table.TransformColumnTypes(Table0,{{"server", type text}, {"database", type text}}),
    Table1 = #"Changed Type"{0},
    server= Table1[server],
    db = Table1[database],
    databaseCon = Sql.Database(server, db),
    dbo_xxx = databaseCon{[Schema="dbo",Item="xxx"]}[Data]
in
    dbo_xxx

 

 

config file:

<root>
  <connection>
    <server>localhost</server>
    <database>dbxxx</database>
  </connection>
</root>

 

 

Notice: you can also store the path of other config file which use to connect the database.

 

<files>
  <list>
    <config1>C:\...\Desktop\config1.xml</config1>
    <config2>C:\...\Desktop\config2.xml</config2>
    <file1>D:\...\file1.txt</file1>
  </list>
</files>

 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Thank you

i need to learn more about DAX

let you know in few days

Gidon

 

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.