Forum Discussion

MacJasem's avatar
MacJasem
Advocate II
2 years ago
Solved

Error message when loading dataset: "The given key was not present in the dictionary."

Hi All

 

I've made some changes to my dataset and the're no errors or issues to see in my tables preview, but when i load the dataset, i get this error message: "The given key was not present in the dictionary."

i've tried removing some applied steps and enabling load on other tables but i can't really figure out why i get this error.

Anybody experienced this before and has found the cause/solution?

  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi MacJasem 

    Go back through the applied steps in your dataset transformation process. Pay special attention to any steps where you're filtering, merging, or performing operations that rely on key-value pairs. It's possible that a step might be referencing a column or key that no longer exists or was renamed.
    Ensure that all the columns or keys used in your operations are correctly named and have the expected data type. A common cause for this error is when a column is expected but not found due to a typo or a change in the column name.
    If your dataset involves merging or relating different tables or sources, verify that the relationships are correctly defined. An undefined or incorrect relationship can lead to this error if the key used to establish the relationship is missing.

    Here are some links for your reference:

    Solved: The given key was not present in the dictionary- P... - Microsoft Fabric Community

    The given key was not present in the dictionary- PowerBI - Stack Overflow

     

    Best Regards

    Zhengdong Xu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi MacJasem 

    Go back through the applied steps in your dataset transformation process. Pay special attention to any steps where you're filtering, merging, or performing operations that rely on key-value pairs. It's possible that a step might be referencing a column or key that no longer exists or was renamed.
    Ensure that all the columns or keys used in your operations are correctly named and have the expected data type. A common cause for this error is when a column is expected but not found due to a typo or a change in the column name.
    If your dataset involves merging or relating different tables or sources, verify that the relationships are correctly defined. An undefined or incorrect relationship can lead to this error if the key used to establish the relationship is missing.

    Here are some links for your reference:

    Solved: The given key was not present in the dictionary- P... - Microsoft Fabric Community

    The given key was not present in the dictionary- PowerBI - Stack Overflow

     

    Best Regards

    Zhengdong Xu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

  • calerof's avatar
    calerof
    Impactful Individual

    Dear Community,

     

    I've found the same issue and the cause was the following. I was trying to make a merge as new with one query that came from a previous query. The previous query was named Project Targets. Then I changed its name to Project Targets Raw. Then I referenced it to create Project Targets Header and another reference to create Project Targets Detail. Then I created the merge as new from Header to Details and renamed this last query as Project Targets, which was the original name of the first query.
    Going crazy with no apparent errors until I changed the name of the last merged query, e.g. Project Target Final, i.e. different from the original query and then I got success, no errors.

    Hope this helps anyone experiencing the same issue.
    Cheers,
    Fernando