Showing results for 
Search instead for 
Did you mean: 

DirectQuery + Enhanced Metadata + Database parameter = crash

We have a .pbit datamodel that has several tables using "= Sql.Database(Server, Database)" as its source. In our case we are using DirectQuery. Not sure if the same problem happens when using import.


Server and Database are template parameters. If we save the template using "enhanced metadata" (which we now have to do after Sept. update), we are not able to change to other parameters than the one that we used when editing and saving the template. 

If we do we get the following error:



Status: New
Community Support



I cannot reproduce the issue. You may try the latest version to recreate the template file.

Advocate I

Hi, I tried creating a new template with the newest PBI version and am still getting the error. 
More detailed:
1. Get data -> Azure DB -> Enter server, db -> Load view "Fact".
2. Create two parameters "server" and "db". Enter same values as used in step 1.

3. Replace the arguments in "Sql.Database" with the parameters.
4. Duplicate the "Fact" query. Remove the navigation step and navigate to another view, "Dim" instead. Rename Query.
5. Close & Apply.

6. Create relationship between Fact and Dim PBI Tables.
7. Save as .PBIT

8. Open .PBIT. Use different value for "db" than before.


In order to get the error, one needs to both use "duplicate" in power query and have a relationship between the tables.

If I enter the same parameters as when I created the template, it does work. Then I can change the parameters in Transform Data -> Edit Parameters with no error. 

Advocate I

I made one template where I duplicate queries (That gives error) and one where I select multiple tables/views and do not duplicate the query (That works).

Comparing, using ALM Toolkit, only relationship id and partition names are different.
So I think there is nothing in the new metadata system that should indicate this error? 

Anyway, temporary workaround: Change parameter into query.