Measure, Dimension and Column Settings: Difference between revisions
Line 47: | Line 47: | ||
== Statistical calculations == | == Statistical calculations == | ||
Statistical calculations contain a miscellaneous list of | Statistical calculations contain a miscellaneous list of useful calculations and adjustments that may be needed for the measures, dimensions and columns. Each statistical calculation is applied to a specific measure, dimension or column, so make sure to choose the right one where to apply the statistical calculation. Several statistical calculations can be selected for the same measure, dimension or column, and they are applied in the order they defined in the list. In addition, dimension statistical calculations are applied before the measure statistical calculations. Certain statistical calculations can only be applied to specific data types, so only the applicable statistical calculations are shown in the list. If the second dimension is defined, the statistical calculations are performed for each unique dimension value separately. | ||
The following statistical calculation options are available: | The following statistical calculation options are available: | ||
Line 70: | Line 70: | ||
*'''Smooth using moving average''': Calculates all measure/dimension/column values as an average of the nearest values. The reference value defines the number of steps to go back to get the calculated range. Applicable only for numbers. | *'''Smooth using moving average''': Calculates all measure/dimension/column values as an average of the nearest values. The reference value defines the number of steps to go back to get the calculated range. Applicable only for numbers. | ||
*'''Calculate moving sum''': Calculates sum for each measure/dimension/column values. Goes back number of steps defined by the reference value. Applicable only for numbers. | *'''Calculate moving sum''': Calculates sum for each measure/dimension/column values. Goes back number of steps defined by the reference value. Applicable only for numbers. | ||
*'''Year-to-date average''': Calculates an average of values between the start of the year until the current row. The time period is determined based on the first dimension. | |||
*'''Year-to-date sum''': Calculates a sum of values between the start of the year until the current row. The time period is determined based on the first dimension. | |||
*'''Add by''': Adds the specified number to all the measure/dimension/column values. Applicable only for numbers. | *'''Add by''': Adds the specified number to all the measure/dimension/column values. Applicable only for numbers. | ||
*'''Multiply by''': Multiplies all measure/dimension/column values by the specified number. Applicable only for numbers. | *'''Multiply by''': Multiplies all measure/dimension/column values by the specified number. Applicable only for numbers. | ||
*'''Divide by''': Divides all measure/dimension/column values by the specified number. Applicable only for numbers. | *'''Divide by''': Divides all measure/dimension/column values by the specified number. Applicable only for numbers. | ||
*'''Sort by this column''': Sorts the data by this measure/dimension/column. By default, data is sorted ascending. The descending order can be defined using the reference values (either ''ascending'' or ''descending''). | *'''Sort by this column''': Sorts the data by this measure/dimension/column. By default, data is sorted ascending. The descending order can be defined using the reference values (either ''ascending'' or ''descending''). | ||
*'''Percentage of all sum''': Calculates how many percentage this row's value is of the sum of all values in this column. Applicable only for numbers. | |||
*'''Difference from all average''': Calculates the absolute difference of this row's value to the average of all values in this column. Applicable only for numbers. | |||
*'''Add row''': Add a row to the dataset containing the reference value. All other cells in the new contain null values. |
Revision as of 19:49, 29 January 2022
When hovering a measure/dimension/column settings, the first of the appearing icons opens a dialog for the measure/dimension/column settings. The following settings are available for measures/dimensions/columns:
General tab
- Custom label: By default, measures/dimensions/columns have automatically created descriptive labels shown for example as chart axis titles or table column names (depending on the visualization). Use the custom label to define your own label which replaces the automatic label. If you want to hide the label, you can use a space as the custom title.
- Color: In charts, color for visualizing this measure/dimension/column, appearing for example as a column or line color.
- Visualization: In charts, series specific visualization for this measures/dimensions/columns. Overrides the default visualization defined in the General tab.
- Mapping in chart: When using the chart, defines how this measure/dimension/column is mapped in the chart, for example to Y-axis, X-axis, series etc.
- Round to decimals: Number of decimals to show for decimal numbers. Integers (whole numbers) are always shown without decimals, so they don't have this field. Note that despite the rounding, values are sorted based on the accurate values.
- Unit: Unit that is shown with each measure/dimension/column value to indicate the unit of the value (e.g. days, euros, cases etc.). In many measures/dimensions/columns, units are determined automatically, but user can always override the unit if desired. It's also possible to use a unit from other measure/dimension/column which can be achieved using following syntax in the Unit field: e.g. ${measure:1}, ${dimension:2}, ${column:3} (similar than in the table web links).
- Unit position: Determines how units are shown with the value. Units can be shown before or after the value, and there can be a space between or not. Unit can also be hidden.
- Date format: Dates are presented using this date format. Note that this field is only visible, when the type of the data is date. For example: dd.MM.yyyy HH:mm:ss, M/d/yyyy HH:mm.
- Date interval: When dimensioning data, date values are divided into dimension value slots using this interval setting. Note that this field is only available for dimensions.
- Hidden: For tables, measures/dimensions/columns can be hidden using this checkbox. For example, conditional formatting can use data from the hidden columns.
Table actions tab
- Web link: When defined (works in tables only), the measure/dimension/column will be a clickable web link opening the target web site to a new tab. Only the text in the table cell is clickable, so filtering is possible when clicking next to the text. To refer to the data in the same row, web links can contain tags (e.g. ${dimension:1}), which are replaced with the data. You can also refer to the clicked value with ${this}. If the web link only consists of a single tag, the tag value is not encoded (because the tag is assumed to contain a full url). If the web link contains static text in addition to the tags, the tag values are encoded using encodeUriComponent (because tags are assumed to be used as url parameters). If the link does not start with http:// or https://, the link is interpreted as a relative link, and it's added to the end of the QPR ProcessAnalyzer url. Examples: https://google.com/search/q=${measure:2}, https://wiki.onqpr.com/pa/index.php?search=${this}
- Variables to set on click: Variables that are set when clicking the text in the column. Similar tags as for the web link, can be used both for the variable name and variable value fields. If there are either the sys:dashboard or sys:dashboardIdentifier variable among the changed variables (i.e. clicking will go to other dashboard), the variables are set to the session level; otherwise they are set to the dashboard level. If defining the Filter or Comparison variable with an empty value, the corresponding filter or comparison rule is created automatically (works only for dimensions).
Special values tab
- Show for null value: When an expression provides a null value, the text defined in this field is shown in the visualization. By default empty text.
- Show for empty string: When an expression provides an empty string value, the text defined in this field is shown in the visualization. By default (empty).
- Show for boolean true: When an expression provides a boolean type of value true, the text defined in this field is shown in the visualization. By default Yes.
- Show for boolean false: When an expression provides a boolean type of value false, the text defined in this field is shown in the visualization. By default No.
Advanced tab
- Adjustment expression: Expression that is added to the end of the measure/dimension/column expression. The adjustment expression can be used for example to convert or map values.
- Calculate measure for: Measure can be calculated for each dimension separately (the default option) which is the normal dimensioning behavior. It's also possible to ignore the dimensioning for this measure and calculate the measure for the currently filtered data (i.e. the measure is calculated for the entire dataset that the chart is based on). Furthermore, it's also possible to ignore filters and calculate the measure value for the entire model data. This setting is only available for measures.
- Variable name: Name of the variable containing this measure or column value. The variable can be used in expressions for other measures. The variable is created when a name for it has been defined. This setting is not available for dimensions.
- Statistical calculations: Different kind of calculations done to measure/dimension/column data. Several items from the list can be used at the same time. Some calculations require an additional parameter, that is specified in the Reference value for statistical calculations field. Available calculations are listed in Statistical calculation methods.
- Reference value for statistical calculations: The reference numerical value that is used in some of the statistical calculations.
- Table conditional formatting: Background color or text color based on data.
- Custom aggregation expression: Define a custom aggregation expression to be used instead of the default aggregation expression. The aggregation expression calculates an aggregate value for the excluded rows that exceed the maximum value when Group Rows Exceeding Maximum is in use.
Other settings
Also the following settings are available for which there is no UI, so the settings need to be defined in the Chart Settings json:
- Color mappings (colorMappings): Maps measure/dimension/column values to colors, so that selected values are always visualized with selected colors. Other values will get colors based on the chart's color palette. Color mappings defined to a measure/dimension/column that is mapped to X-axis or to series, takes effects in charts. There is no UI for this setting, so it needs to be defined directly to the dimension definition in the chart settings. Example:
"colorMappings": { "Robert Miller": "#68DD8F", "Patricia White": "#ef5254", "Mary Wilson": "#b9bdc1" }
- Show in datalabels (showInDatalabels): Defines whether the measure/dimension/column is shown in a chart data label (true/false). If any measure/dimension/column has showInDatalabels set to true, the default data labels are overridden by this setting to show only the defined ones. There is no UI for this setting, so it needs to be defined directly to the measure/dimension/column definition in the chart settings.
- Top items (topItems): Shows only the defined number of dimension values which have the largest volumes (e.g. number of cases or events depending on what's analyzed). Data with the remaining values are now shown. If using only one dimension, the Maximum rows settings provides the same result, but the Maximum rows usually doesn't work in a desired way when there are multiple dimensions - the top items setting is for that purpose. The top items settings is not available for measures. There is no UI for this setting, so it needs to be defined directly to the dimension/column definition in the chart settings.
Statistical calculations
Statistical calculations contain a miscellaneous list of useful calculations and adjustments that may be needed for the measures, dimensions and columns. Each statistical calculation is applied to a specific measure, dimension or column, so make sure to choose the right one where to apply the statistical calculation. Several statistical calculations can be selected for the same measure, dimension or column, and they are applied in the order they defined in the list. In addition, dimension statistical calculations are applied before the measure statistical calculations. Certain statistical calculations can only be applied to specific data types, so only the applicable statistical calculations are shown in the list. If the second dimension is defined, the statistical calculations are performed for each unique dimension value separately.
The following statistical calculation options are available:
- Remove nulls: Removes rows where the measure/dimension/column has a null value.
- Remove empty strings: Removes rows where the measure/dimension/column has an empty string value. Applicable only for strings.
- Remove outliers using normal distribution: Removes rows where the measure/dimension/column has a value that is outside the [average] +/- X * [standard deviation]. The X is defined as the additional reference value. Applicable only for numbers.
- Remove insignificant values from start and end: Removes rows from the beginning and end of the dataset the measure/dimension/column value is below the defined percentage of the maximum value in the dataset. This setting can be used to remove e.g. indiscernible items in a column chart. Applicable only for numbers.
- Remove values lower than: Removes rows where the measure/dimension/column value is lower than the defined limit. Requires numerical column. Applicable only for numbers.
- Remove values greater than: Removes rows where the measure/dimension/column value is greater than the defined limit. Requires numerical column. Applicable only for numbers.
- Remove dates older than specific date: Removes date values that are before the specified reference date. Applicable only for dates.
- Remove dates older than (days): Removes rows where the measure/dimension/column value is earlier than the defined number of days. Applicable only for dates.
- Remove dates older than (months): Removes rows where the measure/dimension/column value is earlier than the defined number of months. Applicable only for dates.
- Remove dates that are in future: Removes rows where the measure/dimension/column value is in future when comparing to the current time. Applicable only for dates.
- Remove repeating values: Removes rows where the measure/dimension/column value occurs the second or more time. i.e. only the first occurrence is preserved. Note that the order of data is relevant.
- Remove values repeating more than: Removes rows where the measure/dimension/column value occurs more than the defined times. Note that the order of data is relevant.
- Fill gaps in dimensioning: Adds rows to the data to fill "missing" values in the series of values. When the data is numerical, all the missing integer values between the minimum and maximum values are created. When the data is dates, all period start timestamps are created between the minimum and maximum date. For date columns, when the reference value is not defined, the period is month. For other periods, the period is defined as the reference value.
- Replace nulls with zeros: Replaces all null values with zeroes. Applicable only for numbers.
- Replace zeros with nulls: Replaces all zero values with null values. Applicable only for numbers.
- Show cumulative values: Calculates sum of values for the measure/dimension/column from the beginning until that data point. Applicable only for numbers.
- Show change from previous: Calculates difference from the previous value. The first value shows zero. Applicable only for numbers.
- Show percentage change from previous: Calculates a percentage change to the previous value. The shown unit changes to percentage. The first value shows zero.
- Smooth using moving average: Calculates all measure/dimension/column values as an average of the nearest values. The reference value defines the number of steps to go back to get the calculated range. Applicable only for numbers.
- Calculate moving sum: Calculates sum for each measure/dimension/column values. Goes back number of steps defined by the reference value. Applicable only for numbers.
- Year-to-date average: Calculates an average of values between the start of the year until the current row. The time period is determined based on the first dimension.
- Year-to-date sum: Calculates a sum of values between the start of the year until the current row. The time period is determined based on the first dimension.
- Add by: Adds the specified number to all the measure/dimension/column values. Applicable only for numbers.
- Multiply by: Multiplies all measure/dimension/column values by the specified number. Applicable only for numbers.
- Divide by: Divides all measure/dimension/column values by the specified number. Applicable only for numbers.
- Sort by this column: Sorts the data by this measure/dimension/column. By default, data is sorted ascending. The descending order can be defined using the reference values (either ascending or descending).
- Percentage of all sum: Calculates how many percentage this row's value is of the sum of all values in this column. Applicable only for numbers.
- Difference from all average: Calculates the absolute difference of this row's value to the average of all values in this column. Applicable only for numbers.
- Add row: Add a row to the dataset containing the reference value. All other cells in the new contain null values.