Functions Utility

Fx

Note: This function will be deprecated after version 25.1. Please use Sparse instead. Legacy documentation is provided below for reference.


 See legacy documentation


The Fx() function allows Excel functions to behave like Quintessence functions. When an Excel array function is passed to the Fx() function, it automatically expands into its array constituents.

Syntax


Fx (Value)

ValueAny Quintessence or Excel function
SparseThis parameter instructs the function not to overwrite any unmatched cells within the
output data, for example when used with AlignToAxes().

Note:

Input parameters can consist of Quintessence functions. This includes functions that return ranges in cases where a parameter value can be a range.

Examples


Example 1. Use Fx to iteratively evaluate every line in a range

Example 2. Using Fx with the ‘Sparse’ parameter to control layout

Example 3. Using Fx to expand an array for use by the Excel Linest() function

Note:

How your system administrator configured Quintessence determines which function parameters are required. In most implementations, administrators configure functions so that certain parameters default to specific values when left blank.

Example 1. Using Fx to iteratively evaluate every line in a range


Without the Fx function

The goal is to categorise the value of the various asset holdings, where a value less than 1000000 is considered ‘Low’ and anything equal to or above 100000 is ‘High’. Without using the Fx function, only the first row is evaluated by the IF function, despite referencing the array B2 to B8.

AssetMarket valueCategory
LEF808000=IF(B2:B8 < 1000000,‘Low‘,‘High‘)
GTE96000
JWQ808000
VWE5050000
TVJ480000
THT240000
GZW1010000
AssetMarket valueOutput (incorrect)
LEF808000Low
GTE96000
JWQ808000
VWE5050000
TVJ480000
THT240000
GZW1010000

With the Fx function

By using the Fx function, the entire range (B2:B8) is evaluated by the IF function, resulting in the correct output.

AssetMarket valueCategory
LEF808000=Fx(IF(B2:B8 < 1000000,‘Low‘,‘High‘))
GTE96000
JWQ808000
VWE5050000
TVJ480000
THT240000
GZW1010000
AssetMarket valueOutput (correct)
LEF808000Low
GTE96000Low
JWQ808000Low
VWE5050000High
TVJ480000Low
THT240000Low
GZW1010000High

Download this example

Example 2. Using Fx with the ‘Sparse’ parameter to control layout


The Fx() function can be used to prevent data from being overwritten by setting the Sparse parameter to TRUE. In this example, the AlignToAxes() function is used in a report which contains predefined formulas. The AlignToAxes() function is passed to the Fx() function. Fx() is provided with an additional parameter (Sparse = TRUE) which instructs it to retain internal unmatched information within the output block. Therefore the first row of totals is not overwritten.

Function call in cell ***:

=Fx(AlignToAxes(A2:D10, F3:G7, H2:I2, "none", "C1,C3", "C2", "C4"), TRUE)
RangeAlign to axes
PortfolioAssetDateIncomeYLGCFH
5010YLG31 Mar 2014250501031 Mar 2014***
5010YLG30 Jun 2014300501030 Jun 2014
5010CFH31 Mar 2014125TOTAL=SUM(H3:H4)=SUM(I3:I4)
5010CFH30 Jun 2014325503031 Mar 2014
5030YLG31 Mar 2014100503030 Jun 2014
5030YLG30 Jun 2014240TOTAL=SUM(H6:H7)=SUM(I6:I7)
5030CFH31 Mar 2014200
5030CFH30 Jun 201490
RangeOutput
PortfolioAssetDateIncomeYLGCFH
5010YLG31 Mar 2014250501031 Mar 2014250125
5010YLG30 Jun 2014300501030 Jun 2014300325
5010CFH31 Mar 2014125TOTAL550450
5010CFH30 Jun 2014325503031 Mar 2014100200
5030YLG31 Mar 2014100503030 Jun 201424090
5030YLG30 Jun 2014240TOTAL340290
5030CFH31 Mar 2014200
5030CFH30 Jun 201490

If the Fx() function had not been used, or Sparse had not been set to TRUE, the internal unmatched information would have been overwritten, in this case the first row of Totals.

RangeOutput
PortfolioAssetDateIncomeYLGCFH
5010YLG31 Mar 2014250501031 Mar 2014250125
5010YLG30 Jun 2014300501030 Jun 2014300325
5010CFH31 Mar 2014125TOTAL
5010CFH30 Jun 2014325503031 Mar 2014100200
5030YLG31 Mar 2014100503030 Jun 201424090
5030YLG30 Jun 2014240TOTAL340290
5030CFH31 Mar 2014200
5030CFH30 Jun 201490

Download this example

Example 3. Using Fx to expand input into an array for use by the Excel Linest() function


In the first function in this example, Linest() only returns one value, which is incorrect. This is because the function is not treating the input ranges as arrays.

Linest
=LINEST(A2:A5,B2:B5,TRUE,TRUE)
RangeOutput
861.3
97
108
129

In Excel, a function can be made to recognise an input range as an array by selecting the output range and then typing CTRL+SHIFT+ENTER. This places brackets around the function {} as shown below. The size of the output range needs to be known in advance.

Linest using Ctrl+Shift+Enter
{=LINEST(A2:A5,B2:B5,TRUE,TRUE)}
RangeOutput
861.30
970.1732050811.313392554
1080.9657142860.387298335
12956.333333332
8.450.3

By enclosing the Linest() function in the Fx() function, the range is expanded into an array, without the need to type CTRL+SHIFT+ENTER. The result is the same, but there is no need to select the output range.

Linest using Fx
=Fx(LINEST(A2:A5,B2:B5,TRUE,TRUE))
RangeOutput
861.30
970.1732050811.313392554
1080.9657142860.387298335
12956.333333332
8.450.3

Download this example