PowerBI Templates - DOI-ONRR/nrrd GitHub Wiki

Instructions for using the PowerBI Templates to check data

Revenue

1. Access the tools you need to open .pbix files

To open any .pbix file to cross check data validation, download Microsoft Power BI Desktop and download the appropriate version for your computer. For Windows PC users, you will most likely need to download the PBIDesktopSetup for x64 platform (photo below). Currently, Power BI does not run on Mac OS devices.

PBI Setup Example

If you need a quick and easy tutorial for installing and running Power BI, you can follow the following: Install and Run Power BI Desktop.

2. Navigating Power BI

Once you have Power BI desktop downloaded, you can get better acquainted with the basics of Power BI by using the general tutorial. This should get you up to speed with everything.

The Connect to Data section will be especially useful.

3. Open a .pbix File

Once you are comfortable with Power BI basics, you can start viewing any .pbix file by double clicking on the file that you saved within your computer. PowerBI templates are saved within the NRRD - Data folder on Microsoft Teams here. For a data validation template, you should see the following once it opens:

3.1 Types of Power BI Temples

So far, we have the following Power BI templates available:

  • Revenue - path within NRRD Data Folder here
  • Production - path within NRRD Data Folder here
  • Disbursements - path within NRRD Data Folder here

Each of these templates are located within specific folders and will have the corresponding excel file in it.

4. Navigating the data validation template

4.1 Pages

  • This template has two reports that are viewed as Pages at the bottom. For this example, we are viewing the Raw Data vs. Monthly Downloaded:

Pages Example

  • You can add new pages to your report by selecting "New Page" or the plus sign

Add Page

4.1. Tables and Filters

There are two tables within this report example. Using filters, you will be able to validate raw data (Top Table) with downloaded data (Bottom Table).

Filters are found on both the left- and right-hand side

  • The filters on the left hand side (Web Downloaded Data) are connected to the downloaded Monthly Revenue (.CSV file)
  • Filters on the right hand side (Raw Data) are connected to the raw revenue data for a specific month. From the photo below, the revenue data corresponds to the September 2021 (red box in the photo below)

  • To compare and validate two datasets, you will need to make sure the Date filter from Web Downloaded Data aligns with the specific raw monthly dataset. For the specific template we have, you need to set the dates to 9/1/2021 and 9/30/2021 (as in the photo below).

Example of Date Setting

User tip: You will have to make sure that you clear the Date filter for web downloaded data as it can cause troubles adjusting dates when the data source is changed. Check Section 5.1 for information on how to reset these filters.

4.2. Fields

The Fields are found on the right of the page

Fields

  • You will see that there are 4 items within the Fields section. These correspond to the data sources that you have connected to. For this template, we have connected to 4 CSV files.
  • You can further expand to explore each item by clicking on the > symbol immediately on the left of the item title. This will show each column that the CSV file has

 Expanded Fields

You can see what CSV columns you are using by clicking on the tables. For example, if you click on the top table of this report you can see that it is linked to the second item within the Fields section or the "CSV Monthly Revenue - Downloaded Data".

Table and Field Data Source

4.3. Viewing and Changing the Data Source

To change the source of Downloaded and Raw Data, you go to File > Options and settings > Data source settings

Change Source Settings

The order does not correspond to the order that you see in the Fields pane. However, for this example report the file names correspond to the names found in the Field:

  • CSV Monthly Revenue - Downloaded Data.csv corresponds to the downloaded data file
  • CSV Raw Data Monthly - Revenue for Portal.csv corresponds to the raw data file

You can change your data source by clicking on the file that you want to change, and then clicking on Change Source. This will prompt you to choose the file from your computer as needed. Following this, click on Ok and then Close. You will then need to apply changes and you will see this notice near the top of the Power BI report.

Apply Changes

4.4. Using CTRL + Click to Activate Buttons or Select Multiple Attributes

4.4.1 Buttons
  • Within the Production Power BI template, there are two buttons (located top-right of the template) that correspond to "Monthly Production" and "Yearly Production", respectively.
  • To activate these buttons, you can hold down the control (CTRL) and click on the button. Make sure you are holding down the CTRL key.
4.4.2 Rows in Tables + Charts
  • To select more than one row in either a table, you do the same as in 4.4.1. You will need to hold down on the CTRL key and then click on the desired rows.
  • For charts, do the same for each pie slice, line, or bar to highlight it.

5. Trouble-shooting common issues within the Power BI template

5.1. Resetting Filters Using the Clear Selections Tool

  • You will sometimes run into the issue of not being able to adjust specific Dates within the Web Downloaded filters section. This can occur at times when you switch data sources. This issue can be resolved using the Clear Selections Tool that is shaped like an eraser and found within the the top right-hand side of each filter.

Using the Eraser Tool

  • Once you click on Clear Selections the filter should reset and all dates available from the web-downloaded dataset you have connected to will be seen.

5.2. What to do when Refreshing Data Fails Out

  • At times when you refresh your data, you will get the following error window:

Failed Refresh

  • This usually happens whenever you open a Power BI template and you refresh data (in our case CSV files) that have paths from another user computer. In the photo above, we are missing one file that was intentionally moved from the original path to simulate this error case. Since the Power BI template is connected to 4 CSV files that may have relationships with each other, Microsoft Power BI will automatically flag this and show 4 errors.
  • From the photo above, we see that three of these errors are the same: "Loading blocked by failures with other queries." This is specifically referring to the second error "Could not find file ..[file path]". This second error refers to a file that is not found within your computer.
  • A failed refresh could easily be resolved by closing the error window and making sure you download the example datasets within the NRRD - Data folder on Microsoft Teams here and change the data source by following the steps in Section 4.3.
  • If you have already downloaded the example datasets and changed the data source, check whether you have moved the file to another location within your computer. For this example error, the file was moved from Downloads to Desktop.

Download Path

  • Here, we will need to update the data source settings as in Section 4.3 by making sure the file path to the file routes to the Desktop. We do this by clicking on Browse and searching for the appropriate file. Once this is fixed, click on Apply Changes.

File Path Changed

6. Data Validation

Data Validation using Power BI templates is simple. Update the data source for both Downloaded and Raw revenue data, respectively. Follow the corresponding checklist for revenue datasets and start comparing.

Disbursements

1. Follow steps 1 - 3

You should view a similar display of Power BI as shown below:

4. Navigating the data validation template

4.1 Pages

  • This template has one report that are viewed as Pages at the bottom.

  • You can add new pages to your report by selecting "New Page" or the plus sign.

4.2 Tables and Filters

There are two tables within this report example. Using filters, you will be able to validate downloaded data (Top Table) with raw data (Bottom Table).

Filters are found on both the left- and right-hand side:

  • The filters on the left-hand side (Web Downloaded Data) are connected to the downloaded monthly_disbursements (.CSV file) which can be obtained from: https://revenuedata.doi.gov/downloads/disbursements-by-month/
  • Filters on the right hand side (Raw Data) are connected to the raw disbursements data for a specific month. From the photo below, the disbursements data corresponds to the January 2022.

File Path Changed

  • To compare and validate two datasets, you will need to make sure the Date filter from Web Downloaded Data aligns with the specific raw monthly dataset. For the specific template we have, you need to set the dates to 1/1/2021 and 1/31/2021 (as in the photo below).

User tip: You will have to make sure that you clear the Date filter for web downloaded data as it can cause troubles adjusting dates when the data source is changed. Check Section 5.1 for information on how to reset these filters.

4.3 Fields

The Fields are found on the right of the page:

File Path Changed

  • You will see that there are 2 items within the Fields section. These correspond to the data sources that you have connected to. For this template, we have connected to 2 CSV files.
  • You can further expand to explore each item by clicking on the > symbol immediately on the left of the item title. This will show each column that the CSV file has:

Picture7

You can see what CSV columns you are using by click on the tables. For example, if you click on the top table of this report you can see that it is linked to the second item within the Fields section or the "CSV Monthly Revenue - Downloaded Data".

4.4 Viewing and Changing the Data Source

To change the source of Downloaded and Raw Data, you go to File > Options and settings > Data source settings.

The order does not correspond to the order that you see in the Fields pane. However, for this example report the file names correspond to the names found in the Field:

  • CSV Monthly Revenue = monthly_disbursements_downloaded_data (jan).csv corresponds to the downloaded data file.

  • CSV Raw Data Monthly = web_upload_disbursements_raw (jan) .csv corresponds to the raw data file.

You can change your data source by clicking on the file that you want to change, and then clicking on Change Source. This will prompt you to choose the file from your computer as needed. Following this, click on Ok and then Close. You will then need to apply changes and you will see this notice near the top of the Power BI report.

5. Trouble-shooting common issues within the Power BI template

5.1 Resetting Filters Using the Clear Selections Tool

  • You will sometimes run into the issue of not being able to adjust specific Dates within the Web Downloaded filters section. This can occur at times when you switch data sources. This issue can be resolved using the Clear Selections Tool that is shaped like an eraser and found within the top right-hand side of each filter.

Picture11 width=

  • Once you click on Clear Selections the filter should reset and all dates available from the web-downloaded dataset you have connected to will be seen.

5.2 Resetting Filters Using the Reset Button

  • Toggling different the dates or other filters can produce different numbers between the bottom and top tables. A simple quick fix would be to click the yellow reset view button at the top right corner to revert to the original filtered view.

Picture12

5.3 What to do when Refreshing Data Fails Out

  • Follow steps 5.2 and 6 from the Revenue section as needed to resolve any issues. Follow 5.2 while considering the file names mentioned in this section or as applicable in the manner that the user has placed the files’ location/file names in their own pc.

  • Note: You’ll likely see two flags since there are only two CSV files in this Disbursements Power BI template and section.

6. Data Validation

  • Follow step 6 from the Revenue section as needed to resolve any issues while considering relevant files/applicable buttons.
⚠️ **GitHub.com Fallback** ⚠️