Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

How to Connect to Two Different Databases in Analysis Services

Let me explain what I am trying to do.

 

I have successfully used Analysis Services to connect to a Billing cube and built a query that gives me the data I need from that database.

 

 

2. In a different PBIX file, I connect to an ERP cube and built a query that gives me the data I need from that database.

 

Now I need a way to to link the data from these two different sources. I cannot pull in both data sources to the same PBIX file because when I connect to one of the databases and click "Edit Queries", all of the options are grayed out. So, I have to connect to each database separately.

 

My colleague told me that I could try to connect via Analysis Services and build a DAX query so that I am just pulling in the data elements that I need from the Billing database. He said within the same PBIX, I could then also connect to the ERP database with a DAX query. Then I would have both datasets in the same PBIX file and could link them.

 

I tried doing this with this simple DAX statement from the Billing database. When I did not have the field '_Billing'[Modality] in the statement, the DAX worked. However, once I added in the modality field, it says "This table is empty."

 

EVALUATE
SUMMARIZECOLUMNS
(
'Provider'[Prov NPI Num],'Date Of Service'[Serv Dte],'_Billing'[Modality],'RVU'[Wrk RVU Value]
)

 

My hunch is that this billing cube has a bunch of complex relationships behind the scenes that I cannot see and I do not know how to link everything together. I am also a beginner in DAX so I am not sure if I could figure out how to go with this option.

 

Here are my ideas for what I could possible do:

 

1. Is there a way to connect a PBIX file to two other PBIX files with a query in it? For example, can I have Billing.PBIX which has the billing query in it and ERP.PBIX which has the query from that system and then connect to those queries somehow in another PBIX file? (My idea is that this would be similar to how you create an Access database and then connect to two other Access databases and pull from them).

 

 

2. If I have a working query built in from the Billing database, is there any way to somehow get all of the coding behind the query with all of the links in the cube so that I could past that into the DAX box when I connect via Analysis Services?

 

 

3. I do not mind exporting the data from each system and then connecting to them in another PBIX file. However, there's so much data that when I try to download it, it says "Data Exceeds the Limit". For one of the databases, I had to break it into 30 different files in order to export it into CSV files. Is there another option for downloading large datasets where I could get it in fewer files?

 

Thanks for any advice.

 

 

 

 

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous 
    Firstly, you cannot connect two pbix or retrieve data from 1 pbix to another.

     

    Secondly, which connector and connection mode did you use to connect the ERP cube? ODate feed?  There is a limitation that if you connect to a datasource with live connection, when try to put them in 1 pbix. But I think you should able to to connect to AS with import mode ,and then retreive your ERP data in the same pbix.

     

    My suggestion is rather export all tables into csv files, try copy and paste the tables put them into 1 table like the solution in this post : https://community.powerbi.com/t5/Power-Query/import-data-from-other-pbix-file-into-the-current-one-Is-it/td-p/53752

     

    Paul Zheng _ Community Support Team
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you Anonymous  for responding. I connected to the database via SQL Server Analysis Services database using the "Connect Live" radio button. I tried doing the Import option but got a time our error. I think the database is just too big.

       

      I looked at the link you provided. However, when I connect to the database, the left menu does not give me the table or data structure view. The only thing I can do is create reports since those other options are not shown.

       

       

       

       

       

       

       

       

       

       

       

       

       

      Therefore, I think for now I'll just have to export the data into individual files. That will work for me even though it's a bit time consuming. I just wanted to make sure there wasn't an easier method that I do not know about.