Using the Template
Last updated
Last updated
The template requires a Windows Operating System with PowerBI Desktop, Python, and the pyfair Python library installed
Download Microsoft PowerBI Desktop
If you don't already have it, you'll need to download the
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
Install python libraries
You'll need the following Python libraries installed. It's recommended to use the pip installer to easily install them.
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 . A data frame is a two-dimensional data structure, such as a table with rows and columns.
is a software library for computing FAIR monte carlo simulations. This is the core library performing the computations for the risk modeling.
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".
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:
Represents how often a threat event is expected to occur annually.
Format: Low, Most Likely (Mid), High
Example: 1, 10, 20
The probability that a threat event results in loss.
Format: Decimal (0 to 1)
Example: 0.35
(represents 35%)
The expected loss directly resulting from the threat event.
Format: Low, Most Likely (Mid), High
Example: 25000, 100000, 500000
How often a secondary loss is expected to occur annually.
Format: Low, Most Likely (Mid), High
Example: 1, 10, 20
The estimated magnitude of secondary losses (e.g., regulatory fines, reputational damage).
Format: Low, Mid, High
Example: 10000, 50000, 150000
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
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".
For troubleshooting and additional information see