Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Changing Db Schema name as parameter fails

We are using Powerbi to connect to a multi schema database. Up till december this worked ok. We use parameters for the database server, the database and the schema name.

Lately, a chang in de schema name causes errors.  

"The key didn't match any rows in the table."

 

We use simple queries like:
let
Source = Sql.Database(dbserver, db),
#"Dimension1" = Source{[Schema=myschema,Item="Dimension1"]}[Data]
in
#"Dimension1"

The problem is present in the direct query mode. Switching to the import data mode did not help. 

The only way I got this working again, was to introducte a new schemaname parameter, and change all the queries.

 

Any ideas?

Status: Needs Info
Comments
v-jiascu-msft
Microsoft Employee

Hi @GvA,

 

1. How did you change the schema name? Changing the parameter or in the Server side? If you change it in the Server side, you need to change it in the Power BI too. If you change the parameter, you have to make sure the new schema have the same table.

2. Does the new schema have "Dimension1"? In other words, does my_new_schema.Dimension1 exist?

3. Do the two tables have same structure?

 

Best Regards,

Dale

Vicky_Song
Impactful Individual
Status changed to: Needs Info
 
GvA
Regular Visitor

1. How did you change the schema name? Changing the parameter or in the Server side? If you change it in the Server side, you need to change it in the Power BI too. If you change the parameter, you have to make sure the new schema have the same table.
Changed the schema name by changing the parameter

2. Does the new schema have "Dimension1"? In other words, does my_new_schema.Dimension1 exist?
Yes it does

3. Do the two tables have same structure?
Yet they do

GvA
Regular Visitor

We've found the cause of the error. 

The database schema autorization was changed. Trying to connect to a schema, wherefore the user is no longer autorized, results in the error message:
"The key didn't match any rows in the table.". 

 

Thanks for the support.