Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
chematos
Specialist II
Specialist II

how to load mathematical operations??

I'm starting to develop with QlikView...

My idea is to create a dynamic table with ranks. I have the maximum value of a resident table and I calculate the number of ranks, that it's the value of $(rangos).

I want to know if it´s possible to do the colored in red operation and how is the syntax, please.

If there is another way easier to do all I said before, please tell me.

Thank you.

Acepto respuestas en Español, gracias.

MAXIMO:

LOAD max(T7) as mayor Resident TRANSACCION;

let maxValor =  Peek('mayor', -1, 'MAXIMO');

let rangos = $(maxValor)/500;

If(IsPartialReload())then

FOR i=1 to $(rangos)

INTERVALOS:

LOAD * INLINE [

    Rango, Valor

    $(i), 500*$(i)

];

NEXT

1 Solution

Accepted Solutions
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Instead of inline you can try with this

   

MAXIMO:

LOAD max(T7) as mayor Resident TRANSACCION;

let maxValor =  Peek('mayor', -1, 'MAXIMO');

let rangos = $(maxValor)/500;

If(IsPartialReload())then

FOR i=1 to $(rangos)

INTERVALOS:

LOAD

     $(i) as Rango,

     500*$(i) as Valor

Autogenerate 1;

NEXT

Hope it helps

Celambarasan

View solution in original post

3 Replies
CELAMBARASAN
Partner - Champion
Partner - Champion

Hi,

     Instead of inline you can try with this

   

MAXIMO:

LOAD max(T7) as mayor Resident TRANSACCION;

let maxValor =  Peek('mayor', -1, 'MAXIMO');

let rangos = $(maxValor)/500;

If(IsPartialReload())then

FOR i=1 to $(rangos)

INTERVALOS:

LOAD

     $(i) as Rango,

     500*$(i) as Valor

Autogenerate 1;

NEXT

Hope it helps

Celambarasan

jagan
Luminary Alumni
Luminary Alumni

FOR i=1 to $(rangos)

Hi,

Try the below script

INTERVALOSTemp:

LOAD * INLINE [

    Rango

    $(i)

];

NEXT

INTERVALOS:

LOAD

Rango,

Rango*500

RESIDENT INTERVALOSTemp;

DROP TABLE INTERVALOSTemp;

Hope this helps you.

Regards,

Jagan.

swuehl
MVP
MVP

I think you can live without using a for loop here:

MAXIMO:

LOAD max(T7) as mayor Resident TRANSACCION;

let maxValor =  Peek('mayor', -1, 'MAXIMO');

let rangos = $(maxValor)/500;

    

INTERVALOS:

LOAD

     recNo() as Rango,

     500*recno() as Valor

Autogenerate $(rangos);