matchHeaders function in the Factory
The matchHeaders function returns the value in the corresponding row for the selected column.
Parameters Parameter Description column Returns the value of the corresponding row of the specified column. Column is a mandatory parameter.
Returns the value of the corresponding row of the specified column. Column is a mandatory parameter.
Example - matchHeaders(column)
The following examples use the Commissions dataset.
In this simple example, there are three possible commission rates for our salesforce, according to the contract selected by the client and their age group.
The commission type to be applied is automatically applied in the Commission Type column with the formula: i
We can now use the matchHeaders function to apply the correct commission percentage, according to the type selected.
To do this we simply create a new column called Commission Applied, and enter the formula
The formula has retrieved the corresponding commission rate from the correct column, according to the type identified in the Commission Type attribute.
The advantage to working in this way is that if commission rates change, or vary according to the day or sales person, or the conditions change, it's really quick to retrieve the new values for each sale.