SetMetric
Version 1.1 by Outhman Moustaghfir on 2024/01/24 14:59
Description
The SetMetric function is used to set a metric in XSLT. It allows you to specify the name of the metric, its alias (projection), and the desired value.
Syntax
<xsl:value-of select="ixf:SetMetric(metricName, projection, value)"/>
Parameters
- metricName: The name of the metric to be set. (Required)
- projection: The alias of the metric. (Required)
- value: The value to be assigned to the metric. (Required)
Example
Consider the following example where the metric "TotalSales" with an alias "SalesAlias" is set to the value 500:
<xsl:value-of select="ixf:SetMetric('TotalSales', 'SalesAlias', 500)"/>
This will set the metric named "TotalSales" with the alias "SalesAlias" to the value 500.
Notes
- All parameters (metricName, projection, and value) are required.