Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everybody.
I´m modyfing a part of an accounting app in where i have a lots of liability accounts. They can be current or non current.
The problem is that the app shows all the accounts as current.
All the liablity accounts are shown as current in a pivot table, what i have to do is "open" the accounts (they are 6) who have more than 12 months and put 12 months like current on that account, and the remaining months like non current in the same account
I´ve been trying a few hours but i don´t figure out what i have to do, at least in what i should begin to look.
I have a photo of the pivot table, the dimension used in the pivot table, and the expresion.
Sory but is in spanish, if you don´t understand i can translate the words.
Here is the load of the fields who are used in the dimension
LOAD | ||
CUENTA, | ||
//GRUPO 1 | ||
LEFT(CUENTA,1) AS GRUPOID_1, | ||
lookup('CUEN_NOMBRE', 'CUENTA_AUX',LEFT(CUENTA,1), 'CUENTAS_TMP') AS GRUPO_NOMBRE_1, | ||
//GRUPO 2 | ||
LEFT(CUENTA,2) AS GRUPOID_2, | ||
IF(LEN(CUENTA)>2,lookup('CUEN_NOMBRE', 'CUENTA_AUX',LEFT(CUENTA,2), 'CUENTAS_TMP')) AS GRUPO_NOMBRE_2, | ||
//GRUPO 3 | ||
LEFT(CUENTA,4) AS GRUPOID_3, | ||
IF(LEN(CUENTA)>3, lookup('CUEN_NOMBRE', 'CUENTA_AUX',LEFT(CUENTA,4), 'CUENTAS_TMP')) AS GRUPO_NOMBRE_3, | ||
//GRUPO 4 | ||
LEFT(CUENTA,6) AS GRUPOID_4, | ||
IF(LEN(CUENTA)>=4, lookup('CUEN_NOMBRE', 'CUENTA_AUX',LEFT(CUENTA,6), 'CUENTAS_TMP')) AS GRUPO_NOMBRE_4 |
Resident CUENTAS_TMP
WHERE CUEN_IMPUTABLE=1 AND
MATCH (LEFT(CUENTA,1),'1','2','3')>0;
This is used in the dimensions. with this you can divide the accounts in categories
Ej :
=IF(ISNULL(GRUPO_NOMBRE_1),'PATRIMONIO NETO', GRUPO_NOMBRE_1) etc...
And here i think is the sum of the money
TMP_SALDOSINICIALES:
FOR i = 1 TO $(vTotal)
load
EMPRESA,
DIVISION_A,
CUENTA,
// MAESTRO,
INSTANCIA,
SALDO AS SALDOINICIAL,
// AÑOMESCONTINUO AS AÑOMESCONTINUOORIGEN,
(AÑOMESCONTINUO + $(i)) as AÑOMESCONTINUO
RESIDENT TMP2;
NEXT i;
DROP TABLE TMP2;
SDOSINICIALES:
LOAD
EMPRESA,
DIVISION_A,
CUENTA,
// MAESTRO,
INSTANCIA,
AÑOMESCONTINUO,
SUM(SALDOINICIAL) AS SALDOSINICIALES
RESIDENT TMP_SALDOSINICIALES
GROUP BY
EMPRESA, //CHEQUEAR
DIVISION_A,
CUENTA,
// MAESTRO,
INSTANCIA,
AÑOMESCONTINUO;