MetricSign
EN|NLRequest Access
Medium severitypermission

Power BI Refresh Error:
AGGREGATION_POLICY_VIOLATION

What does this error mean?

A query was rejected or returned no results because it did not meet the minimum aggregation threshold required by the aggregation policy applied to the queried table or view.

Common causes

  • 1A query returns fewer rows in the GROUP BY result than the policy's minimum group size threshold
  • 2A developer ran an exploratory query that selects individual rows from a table protected by an aggregation policy
  • 3A BI tool issues ungrouped SQL queries against a view where an aggregation policy enforces GROUP BY minimum sizes
  • 4A JOIN operation reduced the effective group sizes below the threshold

How to fix it

  1. 1Step 1: Identify which table has the aggregation policy: SELECT * FROM TABLE(INFORMATION_SCHEMA.POLICY_REFERENCES(REF_ENTITY_NAME=>'<table>')).
  2. 2Step 2: Review the policy threshold — adjust the query to ensure each aggregated group meets or exceeds the minimum row count.
  3. 3Step 3: For BI tool queries, configure the tool to always aggregate to a level that satisfies the minimum group size.
  4. 4Step 4: If the policy is too restrictive for a legitimate use case, work with the data governance team to update the policy or create an exception role.
  5. 5Step 5: For development, use a role that has POLICY_ADMIN privileges or is explicitly exempted from the aggregation policy.

Frequently asked questions

What is a Snowflake aggregation policy used for?

Aggregation policies enforce a minimum group size on query results to protect individual-level data privacy (a k-anonymity approach). They are typically used on tables containing personal or sensitive data to prevent re-identification.

Can I see which role is exempt from an aggregation policy?

Yes. The policy body defines exemption logic. Run DESCRIBE POLICY <name> to see the policy SQL and identify which roles or conditions bypass the minimum group size requirement.

Other permission errors