Using the Template

One-Time Setup (Required)

  1. Download Microsoft PowerBI Desktop

If you don't already have it, you'll need to download the free Microsoft PowerBI Desktop application.

  1. Install the Python Programing Language

The template runs Python code to perform the risk analysis. You'll need to install Python if you don't already have it.

You can download Python from the Python website.

  1. Install python libraries

You'll need the following Python libraries installed. It's recommended to use the pip installer to easily install them.

  • Pandas is a software library for data manipulation and analysis. Pandas offers data structures and operations for manipulating numerical tables and time series. To import into Power BI, Python data must be in a pandas data frame. A data frame is a two-dimensional data structure, such as a table with rows and columns.

  • Pyfair is a software library for computing FAIR monte carlo simulations. This is the core library performing the computations for the risk modeling.

pip install pandas
pip install pyfair
  1. Enable Python Scripting

You'll need to enable python scripting in the PowerBI Desktop Application before using the template.

Go to File > Options and settings > Options > Python scripting.

Ensure you have the correct home directory selected and select "ok".

For troubleshooting and additional information see "Run Python scripts" in the Microsoft Documentation.

2. Entering Your Scenario Inputs

When you open the Power BI template, you’ll see a parameter popup prompting you to enter values for your scenario. These inputs will populate the report and drive the risk simulation.

Here’s a breakdown of each input and how to format it:

1. Threat Event Frequency (TEF)

Represents how often a threat event is expected to occur annually.

  • Format: Low, Most Likely (Mid), High

  • Example: 1, 10, 20

2. Vulnerability

The probability that a threat event results in loss.

  • Format: Decimal (0 to 1)

  • Example: 0.35 (represents 35%)

3. Primary Loss Magnitude

The expected loss directly resulting from the threat event.

  • Format: Low, Most Likely (Mid), High

  • Example: 25000, 100000, 500000

4. Secondary Loss Event Frequency (SLEF)

How often a secondary loss is expected to occur annually.

  • Format: Low, Most Likely (Mid), High

  • Example: 1, 10, 20

5. Secondary Loss Magnitude (SLEM)

The estimated magnitude of secondary losses (e.g., regulatory fines, reputational damage).

  • Format: Low, Mid, High

  • Example: 10000, 50000, 150000

After Entering Inputs

Once you've entered your parameters and loaded the template:

  • The model will automatically simulate outcomes using 10,000 iterations.

  • The outputs will be visualized in the report pages

Troubleshooting

Query references other queries or steps, so it may not directly access a datasource

When loading your model inputs, you may receive multiple errors stating the query references other queries or steps. This error is due to the privacy levels of the sources and query references in order to reduce duplicative python code.

To address it, click on "close". Then navigate to File > Options > Current File > Privacy > Ignore the Privacy Levels > OK.

Then click on "refresh" under the "Home ribbon".

Last updated