> For the complete documentation index, see [llms.txt](https://docs.collibra.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.collibra.com/data-quality-self-hosted/core-concepts/reports/rules-passing-fraction-roll-up-report.md).

# Rules Passing Fraction Roll-Up Report

## What is a Rules Passing Fraction Roll-Up Report?

The Rules Passing Fraction Roll-Up report provides the passing and total rows scanned for user-defined rules over the past 30 days, which are aggregated by dimensions.

## Steps

{% stepper %}
{% step %}
Sign in to the Collibra DQ instance and click the <img src="https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-0c20a262939f347f6b5a8337f3a456ed9586b995%2Fdq-reports-icon.png?alt=media" alt="reports icon" data-size="line"> Reports icon in the left navigation pane.\ <i class="fa-chevrons-right">:chevrons-right:</i> The Reports page opens.
{% endstep %}

{% step %}
From the Reports page, click the Rules Passing Fraction Roll-Up link.
{% endstep %}

{% step %}
To configure the type of chart configuration and data you want to see in the chart, click the ![](https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-e471d6e6763e2ebd4b26dbbadfb0af53fce9cf0c%2Fdq-ellipsis-icon.png?alt=media)ellipsis icon.
{% endstep %}

{% step %}
Click <img src="https://4121921244-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWCrP7Albs8DfJjIQxUxw%2Fuploads%2Fgit-blob-997001e32eb8d6643df667aac5e4ba31baf9a7ea%2Fdq-admin-gear-icon.png?alt=media" alt="" data-size="line">**Chart Configuration**.The Chart Configuration window displays.

{% hint style="info" %}
As a best practice, keep the Chart Configuration as the default.
{% endhint %}
{% endstep %}

{% step %}
For x-axis, select one of the following options from the X-Axis Column dropdown list:

* avg\_percent\_rows\_passing
* dimension
  {% endstep %}

{% step %}
For y-axis, select one or more of the following options from the Y-Axis Columns dropdown list:

* dimension
* avg\_observability\_score
  {% endstep %}

{% step %}
For the type of chart you want to display, select one of the following options from the Chart Type dropdown list:

* Line
* Area
* Column
* Scatter
  {% endstep %}

{% step %}
Click **Save**.
{% endstep %}

{% step %}
Navigate the pages of your report by clicking the **Previous** and **Next** pagination buttons, located bottom-right of the columns.
{% endstep %}
{% endstepper %}

## Sample SQL query

You can use the following sample SQL query for a Rules Passing Fraction Roll-Up report.

```
WITH a AS (
    SELECT * FROM rule_output
    WHERE updt_ts BETWEEN (NOW() - INTERVAL '30 DAY') AND NOW()
),
b AS (
    SELECT * FROM dataset_scan WHERE rc > 1
),
c AS (
    SELECT * FROM owl_rule
),
e AS (
    SELECT * FROM dq_dimension
),
g AS (
    SELECT * FROM owl_catalog
),
h AS (
    SELECT * FROM business_unit_to_dataset
),
i AS (
    SELECT * FROM business_units
),
j AS (
    SELECT DISTINCT dataset, col_nm, col_semantic FROM dataset_schema
),
f AS (
    SELECT
        a.dataset,
        a.rule_nm,
        CASE 
            WHEN c.column_name = '' OR c.column_name IS NULL THEN 'global'
            ELSE c.column_name 
        END AS column_name,
        COALESCE(e.dim_name, 'UNSPECIFIED') AS dim_name,
        c.dim_id,
        ROUND(a.perc) AS perc,
        ROUND(a.perc * b.rc) AS breaking_rows,
        100 - ROUND((a.perc * b.rc) / CAST(b.rc AS DECIMAL)) AS score,
        b.rc AS row_count,
        a.run_id,
        g.alias,
        g.catalog_rank,
        g.db_nm,
        g.run_mode,
        g.source_name,
        g.table_nm,
        i.name,
        j.col_nm,
        j.col_semantic
    FROM a
    LEFT JOIN b ON a.dataset = b.dataset AND a.run_id = b.run_id
    INNER JOIN c ON a.dataset = c.dataset AND a.rule_nm = c.rule_nm
    LEFT JOIN e ON e.dim_id = c.dim_id
    INNER JOIN g ON g.dataset = a.dataset
    LEFT JOIN h ON h.dataset = g.dataset
    LEFT JOIN i ON i.id = h.id
    LEFT JOIN j ON a.dataset = j.dataset AND c.column_name = j.col_nm
)
SELECT
    CASE 
        WHEN AVG(score) < 0 THEN 0
        ELSE AVG(score)
    END AS avg_percent_rows_passing,
    dim_name AS dimension
FROM f
GROUP BY dim_name;
```
