-
Re: Cash flow Sense
Matteo Pietrucci Aug 4, 2017 5:51 AM (in response to Gabriele Formici)Ciao Gabriele ,
Can u post an example of your source input file?
I not understand if your picture is the final result if you would..Ciao Gabriele,
Puoi postare un esempio di excel che hai di input?
Non ho ben chiaro se l'immagine che hai allegato è il risultato che vuoi, oppure è il foglio excel di partenza da replicare in QS, con i dovuti calcoli...-
Re: Cash flow Sense
Matteo Pietrucci Aug 4, 2017 10:06 AM (in response to Matteo Pietrucci )Before your response, i'm trying to replicate your situation..
There is a simple script that u can try with your data or simple excel that i create like your picture..
//MAPPATURA PER DESCRIZIONE CAMPO//
//
//MI CALCOLO IL NUMERO DI COLONNE PRESENTI. NB Solo il numero delle colonne(intestazioni) orizzontali ANNOMESE//
NUM_COL:
LOAD [201501.000000],
[201502.000000],
[201503.000000],
[201504.000000],
[201505.000000]
FROM
[Rettifiche.xlsx]
(ooxml, embedded labels, table is Sheet1, filters(
Remove(Row, Pos(Top, 2)),
Remove(Row, Pos(Top, 2)),
Remove(Row, Pos(Top, 2)),
Remove(Row, Pos(Top, 2))
));
//Mi estraggo il numero
LET vFieldNo = NoOfFields('NUM_COL'); //---- VISTA LA FOTO, SONO 5: 201501 .. 201505 => 5 campi trovati!
DROP TABLE NUM_COL;
//Ciclo per il valore precedentemente calcolato
FOR I=1 TO $(vFieldNo) //ciclo da 1 a 5 per crearmi le dimensioni
TABELLA_INPUT:
LOAD
'20150$(I)' AS ANNOMESE,
[20150$(I)] AS VALORI,
IF(recno()=1,'Clienti',
IF(RECNO()=2,'Altre Entrate',
if(recno()=3,'Fornitori',
if(recno()=4,'Altre Uscite')))) as DESCRIZIONE_VALORE,
'$(I)' as CONTATORE, //Nel caso tu voglia testarla
Recno() as BLOCCO_RIGA, //Nel caso tu voglia testarla
rowno() as NUMERO_RIGA //Nel caso tu voglia testarla
FROM
[Rettifiche.xlsx]
(ooxml, embedded labels, table is Sheet1);
//FOR TESTING
LET vIndicePrecedente=if((I-1)=0,1,(I-1)); //NON avendo l'anno precedente, considero l'apertura 201501 proprio la somma della prima colonna 201501 e non 201412 .. si può cambiatre facilmente
TABELLA_INPUT2:
Concatenate
LOAD distinct
'20150$(I)' AS ANNOMESE,
sum([20150$(vIndicePrecedente)]) aS VALORI, //Sommo la colonna precedente
'APERTURA' as DESCRIZIONE_VALORE
//Recno() as BLOCCO_RIGA
from
[Rettifiche.xlsx]
(ooxml, embedded labels, table is Sheet1)
GROUP BY 1;
NEXT //Passo al prossimo indice
-
Rettifiche.xlsx 9.5 K
-
-
-
Re: Cash flow Sense
Matteo Pietrucci Aug 5, 2017 6:50 AM (in response to Gabriele Formici)..And this is .qvf for testing
-
Rettifiche.qvf 176.0 K
-