As KPI data sources can come in a range of data types and formats, the PI module in Pentana Risk allows you to format your data in a number of ways across data types. This guide will explain the standard formatting rules and give some working examples.
- How can I set a format?
- What is the default format?
- Common Problems with Formatting PI Data
- Examples of PI Formatting
How can I set a format?
Formats are set for individual PIs. They can be set at Import in the 'Local PI Definition' sheet, or in the PI notebook in Browser and Classic. Formats can only be set for Percentage, Money, Number and Duration data types. For information on formatting duration PI data, please see our 'What are Duration PIs?' guide.
Setting a Format in Browser
From the PI notebook, click on the PI title and select 'Edit Settings':
Click on the 'Advanced' setting tab. There is a section called 'Formatting' here. Enter your format mask here.
Setting a Format in Classic
Select 'PI Central' from your topic button and select your PI from the list.
From the PI notebook, select the 'Settings' tab:
There is an option here called 'Format'. Enter your format mask here.
What is a format 'mask'?
A format 'mask' is a string of symbols which tell the system how you want your PI data displayed. The following characters are used to build a mask:
Character | Explanation |
0 | Placeholder for a numerical digit. Your data will have placeholder '0's prefixed if there are not enough digits in the value. |
# | Placeholder for a numerical digit. Your data will not have placeholder '0's prefixed if there are not enough digits in the value. |
. | Used to show the placement for a decimal point. |
£ | Places a pound (£) sign. |
% or '%' | Places a percentage (%) sign. |
+ or - | Places a plus (+) or minus (-) sign. |
' (single quote) |
This enables you to use a # or single quote symbol within your format, i.e. '#'##.00 applied to "123.4" will give you "#123.40". If you want to use a single quote in your format, for example with o'clock, you would need to put in two single quotes, i.e. "# o'clock" applied to "9" would give you "9 o'clock". |
, (comma) |
This enables you to include a comma in your format. |
What is the default format?
No entry in the Format box will result in the default format being applied to the number. All values are stored to a precision of up to 5 decimal places in the Database.
Data Type | Default Equivalent Mask | Explanation | Example Output |
Percentage | #.##'%' | Maximum of two decimal places, percentage (%) sign suffix. | 1.23% |
Number | #.### | Maximum of three decimal places. | 1.234 |
Money | £#.00 | Pound (£) sign prefix, two decimal places. | £1.23 |
Common Problems with Formatting PI Data
Differences between the Value and Gauge/Trend
PI values are stored in the database up to 5 decimal values, and this is the calculated values that power the gauge and trend calculations. If a mask forces the PI to display a rounded value, in some circumstances this can make it seem like the PI is not calculating correctly. To check for this issue you can either remove the PI formatting or contact the Support Team for assistance.
My gauge is showing a warning message about rounding
If your gauge will be affected by the number of decimal places then you will see the following rounding message:
This indicates that the rounded value will affect your gauge status, generally as a result of rounding up over a threshold.
I can't add negative data to my formatted PI
If your PI enforces a positive (+) or negative value (-) it will automatically prefix the data that you enter with this character, creating an invalid data row:
The system will automatically add the minus (-) symbol if you input a negative value even with format masks. Simply remove the negative and positive variations:
And the data will display as expected:
Examples of PI Formatting
Rounding to one decimal place for Percentage PIs
A percentage PI has a value of 33.33%. The PI admin wants to display this to one decimal place only. The mask '##.#'%'' would be applied, so the value shown would be '33.3%'
Showing commas in values over a thousand
Masks can include commas and formatting. To create a format that inserts a comma for large values you'll need to use placeholder masks:
#,##0 applied to a value of 60000 will format as '60,000'
£#,##0 applied to a value of 5000 will format as '£5,000'
Article Comments
0 comments