1 Reply Latest reply: Dec 17, 2015 6:14 AM by Arno Cacciaguerra

# Problem with the translation of an expression

Hi everyone ,

I post this as i'm encoutering kind of a problem with an expression In qlikview.

I ve been searching in the other posts but havn't seen an answer to my problem at the moment.

So let me show you: I have this table in Excel that i'd like to get in Qlikview to do a waterfall

Actually, i know how to do a waterfall but i need some help translating formulas for "crecen" which is " Increasing", for "decrecen" that is " decreasing"," nuevos" for "new one" and "perdidos" for " those that were lost"

In my script, i have this as fixed:

VARIABLES

vPeriodo

\$(=Max(PeriodoID)

vMesAnterior

PeriodoID={"\$(=Max(PeriodoID)-12)"}

In excel, i have for:

- "crecen" =IF(E2>0;E2;"") that i translated with "IF(Sum({<vPeriodo>}IMPORTE)-sum({\$<\$(vMesAnterior)>}IMPORTE) >>0,Sum({<vPeriodo>}IMPORTE)-sum({\$<\$(vMesAnterior)>}IMPORTE) )"

- "decrecen" =IF(E7<0;E7;"") that i translated with "IF(Sum({<vPeriodo>}IMPORTE)-sum({\$<\$(vMesAnterior)>}IMPORTE) <<0,Sum({<vPeriodo>}IMPORTE)-sum({\$<\$(vMesAnterior)>}IMPORTE) )"

- "perdidos" =IF(C2=0;E2;"") that i translated with "IF(Alt(Sum({<vPeriodo>}IMPORTE), 0),Sum({<vPeriodo>}IMPORTE)-sum({\$<\$(vMesAnterior)>}IMPORTE))"

- " nuevos" =IF(D16=0;SI(E16>0;E16;"");"") that i translated with "if(Alt(Sum({\$<\$(vMesAnterior)>}IMPORTE), 0),IF(Sum({<vPeriodo>}IMPORTE)-sum({\$<\$(vMesAnterior)>}IMPORTE) >>0,Sum({<vPeriodo>}IMPORTE)-sum({\$<\$(vMesAnterior)>}IMPORTE) ))"

But at the moment, any of these formulas are working as they re supposed to...

Best regards,

Arno Cacciaguerra

• ###### Re: Problem with the translation of an expression

Here is a copy of what i get in qlikview using these formulas

See that i get the same number for both Crecen/Decrecen/Perdidos/Nuevos which is, to my mind, not that easy to understand