Power Query : Data Source Connection issue - excel

I am using Power Query for Excel and I am trying to connect MySQL database which is hosted on AWS. While trying to connect, I am getting an ERROR in query editor saying "DataSource.Error: Object reference not set to an instance of an object."
My Excel and Power Query both has 32-bit version.
Is there any issue in setting up Data Source?
Thanks

Just had the same problem. 64 bit Excel and latest version of PowerQuery. The cause of mine was that I had copied and pasted the output of a PowerQuery query into a new Excel sheet. This created a shadow second data connection invisible to the PowerQuery pane.
To fix it I had to go to the Data ribbon > click Connections, highlight the second query (named [YourQueryName]1) and click the Remove button. After that things went back to normal.

You may want to Send-A-Frown from inside Power Query to get in direct contact with the developers.
Please check that you have the latest version of Power Query installed. It might help to upgrade MySQL drivers too.

Related

Export Data Connection Query from Excel to CSV (>2M rows)

I have a spreadsheet that is using power query in a data connection to execute modelling on CSV files that have more than 2M rows.
This works fine and I can run analysis on this data as needed.
However, now I want to export the resulting data after all the manipulations have been made.
I can't see a way to export the data query result without outputing to a sheet... which I can't... because the row count is >1M.
Can I export the data without outputting to a sheet/multiple sheets?
If so, what tool would I need (if any) and what are the general steps?
I've been trying to work this out on my own for months but I have to recognise my limitations and ask for help now.
Many thanks in advance.
DD
You need to use an external tool like DAX Studio (free) to connect to the Power Pivot data model and export the tables to CSV.
https://daxstudio.org/
As David mentioned above, Dax Studio will output the results of the data model.
Steps as follows:
Download and install the Dax Studio plugin for excel
Make sure the connection you are trying to extract is in the data model.
Launch Dax Studio.
!!!Dax Studio will only be able to read your data if you launch it from the Add-ins tab of Excel. This is the only data source type where access to the data is dependent on how Dax Studio is launched. Again, YOU MUST LAUNCH THIS FROM THE ADDINS MENU OF THE EXCEL DOCUMENT CONTAINING YOUR QUERY/CONNECTION.
A dialogue box will appear. It should show data source "Power Pivot Model" as the radio selection. If it is greyed out, it means that you have not added your query/connection to the data model.
Select "Connect". You will now see all the tables in your data model on the left hand side and may now extract to csv.

Dowload Table in Excel via Power query

I need to download this table in Excel
https://infogram.com/a-energy-suppliers-hedging-table-1hdw2jpg7n8xj2l
via Power Query and make an automatic update connection. But for some reason it does not work because it does not recognize the table as such. I do not know why any suggestion?
Thx

Why is using Power Pivot getting the Data Model deleted in Excel?

I am using Power Pivot to do some analysis and then make Pivot tables from the data model. There are more then 1 interconnected tables. The tables have been created using Power Query. The relationships are created using Power Pivot.
After my work is done and the Excel File is closed, the data model gets deleted. I can see that as the file size gets reduced. Also when I open the file and try to modify the pivot tables receive the following message: " the connection for this pivot table has been Deleted". The queries that were created using power query do not refresh either (Shows: Download Failed).
When I open the Power Pivot for Excel window, it does not show any tables in it.
I am using Microsoft Professional Plus 2016. Already Repaired MS Office.
Would really appreciate if any one can help.
Thank you.
Looks like this problem is caused because of Power Pivot Crashes. Found this blog https://exceleratorbi.com.au/does-the-power-pivot-excel-add-in-crash-for-you/, followed the steps and that seems to solve my problem for now. Its interesting that this problem is there since long and Microsoft has not been able to solve it yet.

Tabular SSAS Analyze in Excel error

I've created a new Tabular Project with SSDT2015 and deployed it on a SSAS2012 named instance, from Management Studio I'm able to connect to the SSAS database and with an EVALUATE command I can see the rows of deployed tables.
If I press Analyze in Excel from SSDT appears a window Analysis Services Connector 13 asking me to choose between Analysis Server and Cube file.
I've tried both options but clicking on finish I can see a grayed out Excel sheet with no connection available.
If I try to connect to SSAS from a fresh Excel using From Analysis Service option, filling the required info leads me to the following message "No data fields are available in the OLAP Cube". Can someone suggest me a way to solve this issue ? Best regards Fabrizio
I was able to solve this problem by adding a Measure to a table in my cube, something like AVERAGE('Table'[Field]) or SUM('AnotherTable'[AnotherField]) over a number of rows. After I added this I was able to load my cube in Excel as a pivot table.

Has anyone achieved to use ODBC connection from Excel file into Powerpivot?

I have installed Powerpivot for Excel 2010. I don't have Access 2010 so I thought could I arrange the data in the similar manner as I would for a database.
I'm wanting to query an excel file that has rows of self-generated data into Powerpivot in order to perform simple pivot table. In a sense attempt to get an overview of information about a data set.
At the moment, I'm unable to get set up correctly the ODBC I'm hoping I need to accept an Excel file and to get PowerPivot to accept a database from an Excel file.
Edit: I come to understand that I need to set up a table correctly in Excel so that the ODBC works correctly. Does the picture I provided be right manner to set up a table or any other manner?
Has anyone attempted to do this and if so what would the steps be?
Thanks,
Peter.
Peter, I am working on the basis that your data is in a recognizable table on a worksheet (and that you are not interested in using the standard Excel import method through 'From Other Sources')
If you create the connection to the Excel file in a very particular way it is possible to then query it as if it were a database.
Create a Connection to the spreadsheet in question in Excel through Data>Connections>Add.
In the PowerPivot window on the Design tab click on existing connections and find the connection you just created. Select the connection and Open.
You need to name the connection and then you will be offered the normal import options. Select the sheet you want to get the table from (its actually not important which one you choose at this point).
Once the table has been imported you can re-enter the setup through the 'table properties' on the design tab and you will now be able to 'Switch to' the query editor at which point you can not only write SQL to query your DB but reference any other .xlsx you like.
Jacob
the easiest way is to use a linked table from the excel sheet which has the data - is there any reason why you have not considered this as an option?

Resources