User Profile
cl27274
Copper Contributor
Joined Feb 03, 2021
User Widgets
Recent Discussions
Excel Query not working on different computer
Hello, I have an excel workbook with a query. The workbook is in a folder on One Drive. I can run the query just fine from my computer. One of my co-workers can run the query just fine from their computer. But another co-worker can't run the query, it gives them an error: I tried deleting this transformation and the next transformation was also giving an error. I tried deleting that one as well and the next transformation also gave the same type of error. Not sure why this is happening. Thank you for the help1.1KViews0likes0CommentsRe: Power Query - Expression.Error: Illegal characters in path, cell value as input
SergeiBaklan This is the code for GetValue() (rangeName) => Excel.CurrentWorkbook(){[Name=rangeName]}[Content]{0}[Column1] In a cell or in a table, I want to have text - that is the query I want to run. The value in the lookup table/cell is a concatenation of different cells that makes the text Odbc.Query(....). The reason for the concatenations is to be able to modify the query from another table. I want to run the query: Odbc.Query(.......). I have now tried putting the query into a table and referencing it with this fParameter function: let Parameter=(TableName,ParameterLabel) => let Source = Excel.CurrentWorkbook(){[Name=TableName]}[Content], value = Source{[Parameter=ParameterLabel]}[Value] in value in Parameter Instead of executing the query, it loads a 1 column, two row table that looks like this: I hope this clarifies it a little bit.6.7KViews0likes3CommentsPower Query - Expression.Error: Illegal characters in path, cell value as input
Hello, I have a function GetValue(), that gets the value from a cell that I named "Query". However when I then try to run the query, it gives me an error : Expression.Error: Illegal characters in path This is the M code: let value = Text.From(Excel.CurrentWorkbook(File.Contents(GetValue("Query")))), Source = value in Source I tried adding Text.From to see if it would change anything but it didn't. I can't quite seem to understand why it's not working. The value = Odbc.Query(...), i then make source = value. Thank you for the helpSolved7.1KViews0likes5CommentsA connection was successfully established with the server, but then an error occurred during the pre
@Sergei Baklan I'm trying to use parameters in power query. I am now having a new error appear: DataSource.Error: Microsoft SQL: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) Details: DataSourceKind=SQL DataSourcePath= (some server name) Message=A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) ErrorCode=-2146232060 Number=10054 Class=20 I'm connecting to a Linux server, OS: 3.16.0-4-amd64. Typically, when connecting to it I go to get Data -> Odbc -> and then select the DSN and paste my SQL statement in the advanced options ... and it works perfectly Now I'm trying to use the following M code and it is giving me the error shown above Source = Sql.Database(Server, Database,.....) Thank you for the help19KViews0likes1CommentRe: Parameterized Sql Statement: Expression.Error: This native database query isn't currently supported
SergeiBaklan I've tried to do this, unfortunately, I'm getting a new error. DataSource.Error: Microsoft SQL: A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) Details: DataSourceKind=SQL DataSourcePath= (some server name) Message=A connection was successfully established with the server, but then an error occurred during the pre-login handshake. (provider: TCP Provider, error: 0 - An existing connection was forcibly closed by the remote host.) ErrorCode=-2146232060 Number=10054 Class=20 Normally, I connect to the SQL database through an ODBC connection. Would this change anything to the code? I also tried using Odbc.Query, and Odbc.Datasource as alternatives to Sql.Database, but it didn't help12KViews0likes0CommentsRe: Parameterized Sql Statement: Expression.Error: This native database query isn't currently supported
SergeiBaklan Thank you for the quick reply, please note I'm not really familiar with M code and don't quite understand your solution. I will add some more detail about the issue I'm facing. My SQL Query looks like this: CALL SALES_BY_CATEGORY_1234 ( '51','2020-01-01','2020-12-31','','en','dd/MM/yyyy','2020-03-01','2020-12-01','Product','all','all','all','all','','all','','TPHX16','all','all','all','Regular','All','No','No','No','No','No','00208 ','All','202101','Detailed','all','all','all','Customer Salesman','all','Default') Also in terms of the parameterized SQL statement, I have created a table (2 columns, 1st column parameter "identifier" 2nd column, the value I want as input) which a user can input (type), the value which will be the input for the SQL statement. I then created a function with power query that would do this. Example: CALL SALES_BY_CATEGORY_1234 ( '51',fParameter(ParameterTable,From),'2020-12-31','',......) where ParameterTable is the name of the table where I have my input and From is the parameter "identifier", which lets the function know which value to place into the query. You said that your solution was one of a few, is there something that can align more towards what I'm trying to achieve? Thank you12KViews0likes5CommentsParameterized Sql Statement: Expression.Error: This native database query isn't currently supported
Hello, I have a query in excel that loads without any issues. I have tried adding parameters to the query(SQL - statement), but this leads to this error: Expression.Error: This native database query isn't currently supported. I tried looking at the M code and seeing if I could turn query folding off, as from looking around on different forums this is what came up as a solution, however I don't have that option. I was wondering if any would know if there any other potential solutions to my problem. An extra detail: The query itself isn't a select * from some_table, its a call to a procedure that has inputs that I would like to parameterize in excel. Let me know if you need more details, also if this is the right forum to post this on. Thank you for the help!Solved13KViews0likes8Comments
Recent Blog Articles
No content to show