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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Arthemis_Runner
Frequent Visitor

Value cannot be null. Parameter name: key - Power BI Semantic Model

I am getting this error on one specific report. I am unable to add a new data source or change the current data sources. I get the error: "value cannot be null. Parameter name: key"

 

Arthemis_Runner_1-1724706437520.png

 

Power BI Version: 2.132.1053.0 64-bit (August 2024)

 

Troubleshooting attempts:

- Cleared all permissions

- Signed out and signed back in

- Uninstall and reinstall PBI version

 

User Story:

- Open pbix file in power bi desktop

- Click transform data and select Data Source Settings

- Select required data source and click change data source

- double click replacement semantic model.

- Select required tables and click submit

- Error is thrown while data is trying to load.

1 ACCEPTED SOLUTION
Arthemis_Runner
Frequent Visitor

I had to delete each model "piece" by piece" to identify which one was causing the issue. Then I deleted that one and recreated the columns and connections.

 

I'm not really sure what was going on with that particular model. Hopefully someone figures it out.

View solution in original post

4 REPLIES 4
nilimarodrigues
Helper III
Helper III

I was encountering the exact same issue. This error was coming up when I was adding a new datasource. Weirdly, when I try adding this new datasource in a completely new PBI, it worked fine but when I was trying to add it in my existing PBI, kept failing with the above error of "Value Cannot be null. Parameter name Key". 

The issue was for some weird reason, while adding the datasource, PBI was also adding null and query=null in the connection string (this can be seen when you open the table/dataset that you are trying to add through query editor). I did not needed it so I removed both null and query = null. Save my file. Closed Power BI and reopen Power BI and refresh and it worked! Hopefully it helps someone else who is facing similar problem.

 

Arthemis_Runner
Frequent Visitor

I had to delete each model "piece" by piece" to identify which one was causing the issue. Then I deleted that one and recreated the columns and connections.

 

I'm not really sure what was going on with that particular model. Hopefully someone figures it out.

Anonymous
Not applicable

Hi, @Arthemis_Runner 

I am glad to help you.

 

May I ask what type of data source you are using? What type of data source do you modify to when you modify the data source?

 

Based on your error message, perhaps you can check your data source for null values and make sure that all required parameters and fields are filled out correctly, especially the connection string.

 

 

I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
Best Regards,
Fen Ling,
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks  for the response @Anonymous.

 

Both data sources are power bi semantic models via direct query. The current model is in our development workspace and the target is our production workspace.

 

I connected a blank pbix file to the production dataset and it worked perfectly. Also, I tried just adding an excel file data source to the original file and I got the same error.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors