# USING AS – a simple function to share data between two or more matrices

The [b:1iipt5ai]USING AS[/b:1iipt5ai] function is a very simple, but effective way to share data between two or more matrices.

The function allows you to share values between matrices whilst they have shared categories and items. A simplified version of a [b:1iipt5ai]USING AS[/b:1iipt5ai] formula would look like this:

[color=”Green”]Matrix2[/color]::Total Sales = [color=”Indigo”]Matrix 1[/color]::Sum of Customer Sales [b:1iipt5ai]USING[/b:1iipt5ai] [color=”Indigo”]Matrix 1[/color]::Month item [b:1iipt5ai]AS[/b:1iipt5ai] [color=”Green”]Matrix 2[/color]::Month category

The important thing about the [b:1iipt5ai]USING AS[/b:1iipt5ai] function is that you must have one item and one category as your referenced values. i.e. Month item and Month category.

I have attached an example [b:1iipt5ai]USING AS[/b:1iipt5ai] model containing a description of how the example is set up in the “Instructions” canvas

USING AS is a statement that is added to the end of a formula – after the calculation piece. It would look more like this:

Cuenta Contable = if(indicadores::time switch presupuesto = 1, Consolidación operaciones::CFV Cuentas, 0) [b:1bdpbxvh]using[/b:1bdpbxvh] lista pres oper::CFV Cuentas [b:1bdpbxvh]as[/b:1bdpbxvh] Cuenta Contable skip Total Año, Sum of Resultado, Total Gerencia, Sum of Centro Costo

Without seeing your model I can’t be sure that the formula is 100% accurate. In this case, lista pres oper::CFV Cuentas should refer to a range of items that is equal to the item names in the category Cuenta Contable.

I hope this information is useful.

Hi

I´m having a problem with this formula, I wanna combine the “USING AS” with the conditional formula “IF”, but it doesn´t work and appears a syntax error after the first condition of the “USING AS” formula.

My formula goes:

Cuenta Contable = if (indicadores::time switch presupuesto = 1; [b:21pc7tgj]Consolidación operaciones::CFV Cuentas[/b:21pc7tgj] using lista pres oper::CFV Cuentas as Cuenta Contable; 0) skip Total Año, Sum of Resultado, Total Gerencia, Sum of Centro Costo

The Error is (Syntax error after “CFV Cuentas”)

I wanna know if there is a way to combine both function

Thanks