PBI Automated Checks
This Power BI external tool runs automated checks on a report and generates a list of exceptions to warn you of potential problems.
The checks currently supported are:
-
Page Structure
- Have filters been applied and forgotten in the report, page or visuals?
- Are the page sizes default, or have they been changed?
- Is the report landing page the first page? (first page user sees)
-
Data - these are 100% flexible and can be built with DAX Studio. Examples:
- Check the row count of tables you know shouldn’t change (e.g. Calendar table);
- Look for specific figures you’re expecting (e.g. max date, sum of sales for FY19/20, etc);
- Define % variance criteria and flag outliers (e.g. forecast is up 10% from last month, needs investigation);
- Compare data source figures vs Power BI figures to check if any discrepancies were introduced during data processing;
- Any other applicable to your specific report!
Requirements
To run the "Page Structure" checks you'll need Admin rights to the machine to install the tool.
To run the "Data" checks you'll need Global Administrator/Application Administrator role in Azure AD and Power BI Admin role to setup a Service Principal (detailed instructions coming soon). If you don't want, or are unable to set this up, you can disable these checks. You will also need a Power BI Pro Account to run these "Data" checks.
Install
Instructions also available on YouTube
- Launch PowerShell as an Administrator
- Copy/paste the following command and press enter:
Invoke-Expression -Command (Invoke-WebRequest -Uri "https://raw.githubusercontent.com/flavio-meneses/PBIAutomatedChecks/main/Install.ps1" | Select-Object -ExpandProperty Content)
This will download the required files to your "Downloads" folder and install them on your machine.
After installation, the tool will be visible when you open the "External Tools" ribbon in Power BI Desktop. If you had Power BI open during installation please restart it.
Configure checks
- Navigate to "C:\PowerBI_AutomatedChecks"
- Open the "Settings.json" file and replace the placeholders with the variables required. Please make sure to include double backslashes \\ for any file or folder paths;
- If you're not running the "Data" checks you can ignore the "systemSettings" and should make the propery "runDAXtest" 0 for each of the reports;
- If you are running the "Data" checks, go to each of the "Tests" folder and update the "DAXTests.dax" file with the Data checks you want for that report.
Use tool
- In Power BI, go to the "External tools" menu and click the "Automated Checks" button. This will run the checks and generate an automated report that will be saved to your desktop.
- If there's a check you don't want to run, you can go to the "Tests" folder for that report and add it to the "IgnoreTests.json" file. For example:
[
{
"Check Type": "File Structure",
"Check Name": "Page dimensions for page 'Page 1'"
},
{
"Check Type": "File Structure",
"Check Name": "Report landing page is first page"
}
]