Forum Discussion
Unable to Connect to Data Source Undefined
[UPDATE BELOW]
Hi,
I am having this issue when refreshing a report that I have in Power BI Services.
Something went wrong
Unable to connect to the data source undefined.
Please try again later or contact support. If you contact support, please provide these details.
Underlying error code: -2147467259
Underlying error message: 5 arguments were passed to function which expects between 2 and 4.
DM_ErrorDetailNameCode_UnderlyingHResult: -2147467259
Microsoft.Data.Mashup.ValueError.Arguments: {Table.FromRecords({}), "Index", 0, 1, number}
Microsoft.Data.Mashup.ValueError.Reason: Expression.Error
Cluster URI: WABI-US-NORTH-CENTRAL-C-PRIMARY-redirect.analysis.windows.net
Activity ID: a206391b-cff3-452a-b437-01deca29af12
Request ID: 704c85c9-9939-4d9d-b584-2b1d0b14d9bc
Time: 2020-08-14 20:52:20Z
This report refreshes with no problem when I'm refreshing it using Power BI software, but it does not refresh in Services. Nothing is wrong with the query.
Any ideas?
[Update]
After removing each step I have done to get to my final outcome, I found out that the problem occurs when I add an index column in the query. I do not know why it causes the error as it is a built-in Power Query function. This step is crucial to get what I need so removing the step would not be an option.
Thanks!
Daren
Hi Anonymous
I have found the solution.
The problem lies within the Index Column formula itself. Notice that it has 5 parameters, the last one being "type int". The newer Power BI Desktop version automatically adds in the 5th parameter, which is the "type". If you remove that parameter completely, you will be able to refresh in Services. However, if you do not want to remove that parameter, you could simply update your Data Gateway to the latest version. Either one works.
Daren
10 Replies
- lbendlinSuper User
What do you think is causing this message?
Underlying error message: 5 arguments were passed to function which expects between 2 and 4- darentengmfsPost Prodigy
Hi lbendlin
I am not sure. This new query is referencing to another query with added new steps that does not seem to be the problem. I have added 3 calculated columns for that table with these formulas:
Running Total =
Calculate ( SUM('Cost'[Value]), ALL('Cost'),
'Cost'[Index] <= Earlier('Cost'[Index]))
and
Running Total % =
'Cost'[Running Total]/Sum('Cost'[Value])
and
Group = if('Cost'[Running Total %] <=0.3, "A", if(and('Cost'[Running Total %] > 0.3, 'Cost'[Running Total %] <= 0.6), "B", if('Cost'[Running Total %] > 0.6, "C", "Error")))
They all run just fine and refreshes just fine in Power BI.
- v-deddai1-msftCommunity Support
Hi darentengmfs ,
Please check the different privacy level settings in Power BI Desktop and Power BI Service. Make sure you have the same privacy level security:
In desktop:
Options and Settings --> Data Source Settings
For every Datasource: --> Edit Permissions
In service:
Datasets --> (Choose you Datasets which does not update properly) --> settings --> Gateway Connection --> Actions --> (expand you cluster to show all Data Sources) --> (Choose relevant Datasource) --> Advanced Settings --> Privacy setting
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Best Regards,
Dedmon Dai