DAX code
Validity % =
VAR ValidRows = COUNTROWS(FILTER('Sales', 'Sales'[Amount] >= 0 && NOT ISBLANK('Sales'[CustomerID])))
RETURN
DIVIDE(ValidRows, COUNTROWS('Sales'))
Expresses rows that satisfy a validation rule as a percentage of total rows.
Type your table and column names once. Every measure below updates.
Validity % =
VAR ValidRows = COUNTROWS(FILTER('Sales', 'Sales'[Amount] >= 0 && NOT ISBLANK('Sales'[CustomerID])))
RETURN
DIVIDE(ValidRows, COUNTROWS('Sales'))
Replace the condition inside FILTER with whatever business rule defines a valid row in your data.
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to Validity % (Rows Passing a Rule).