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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Newcolator
Helper II
Helper II

Model error in report refreshes in service

Hello. When I refresh my report in PBI desktop I get this error because the data in the test area of Snowflake contains duplicates.

 

Newcolator_1-1749563560487.png

 

If I publish the un-refreshed report to the service and refresh it there, I don't get any errors. Does a refresh in the service not detect model errors due to data problems?

 

Thanks.

7 REPLIES 7
v-ssriganesh
Community Support
Community Support

Hello @Newcolator,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

v-ssriganesh
Community Support
Community Support

Hi @Newcolator,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

speedramps
Community Champion
Community Champion

Do you know that when create a new PBIX in Power BI Desktop and publish to Power Bio Service that is creates 2 objects. The Dataset (semantic datamodel) and a the Report (pages of visuals).

Possible reasons why you are getting different results :-

 

1) In Power BI Desktop aply the changes and preview all, then apply changes and refresh.

2) You have not checked the dataset refersh history, which will show the error. 


3)The error you are getting is with the Dataset and not the report. So if you are just publishing the Report then you may have a different dataset on Power BI desktop and in the Power BI Service.

 

4) The Power BI Service dataser as paramateres settings different to you Power BI desktop.

 

5) Your are using a datasource with row level security. Your Power BI Desktop has credentials to the the duiplicate but your Power BI Service gateway credentials do not.

 

Hope these help.

Click, the thumbs up for trying.

Click accept solution if any work.

Thank you

 

Newcolator
Helper II
Helper II

Thanks for that. So I'm guessing there's no way to make the refresh in the service pick up on the error and fail?

Hi @Newcolator,
Thank you for reaching out to the Microsoft fabric community forum.

Unfortunately, no, there’s no built-in way to make the Power BI Service fail a dataset refresh due to model-level issues like duplicate keys unless those errors cause actual query or model breaking behaviour during refresh time.

Please consider below workarounds:

  • In Power Query, you can add a data check that groups by CLAIM_KEY, counts occurrences, and identifies duplicates. If any are found, the query can trigger an error to stop the refresh. This ensures the refresh fails in both Desktop and Service when duplicate keys are present, helping you catch issues early before they affect your reports.
  • If your data is sourced through a Dataflow, you can build a validation step inside it and only load clean data into the report dataset.

Thank you, @speedramps & @ajaybabuinturi for sharing valuable insights.

If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.


Hi @Newcolator,
I hope the information provided has been useful. Please let me know if you need further clarification or would like to continue the discussion.
If your question has been answered, please “Accept as Solution” and Give “Kudos” so others with similar issues can easily find the resolution.
Thank you.

ajaybabuinturi
Solution Supplier
Solution Supplier

Hi @Newcolator,

Power BI Desktop validates relationships and data integrity strictly when you refresh your model. If the column on the one-side of a many-to-one relationship (or a primary key column) contains duplicates, it immediately throws an error, as it's breaking the relationship rules.

In your case:

  • CLAIM_KEY in the CLAIM table is expected to be unique, either because it's:
    • Marked as a primary key in the data model (implicitly or explicitly), or
    • On the one-side of a many-to-one relationship.

But your Snowflake test data has duplicates like '43924319'.

Why Power BI Service doesn’t throw the same error

Power BI Service does not always enforce the same validation logic at refresh time as Power BI Desktop. This discrepancy can be due to:

  • Query caching or model pre-processing (e.g., it might not fully reprocess the model in the same strict way unless forced).
  • Data already loaded: If the model was working and uploaded before the duplicates existed, the refresh may not fully revalidate the schema or relationships.
  • Service vs Desktop engine differences: The Power BI Service engine may allow refresh to complete but you might later see incorrect visuals or broken relationships.

Important: Even though it doesn’t fail in the Service, the model can be logically incorrect — visuals depending on CLAIM_KEY might give wrong results.

 

You should resolve the duplicates in one of these ways

1. Filter duplicates out

In Power BI Desktop, go to Power Query (Transform Data):

= Table.Distinct(CLAIM, {"CLAIM_KEY"})

Or filter based on a condition that avoids test data.

2. Change the relationship

If duplicates in CLAIM_KEY are valid in your scenario (e.g., one claim has multiple entries), you may need to:

  • Change the relationship to many-to-many, or
  • Move CLAIM_KEY to the many-side of the relationship.

3. Handle test vs prod data differently

If this only happens in a test Snowflake environment, consider:

  • Adding a parameter or filter to exclude known problematic test data.
  • Creating two versions of the dataset, one for test, one for prod.

Thanks,
If you found this solution helpful, please consider giving it a Like👍 and marking it as Accepted Solution✔. This helps improve visibility for others who may be encountering/facing same questions/issues.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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