Qlik Community

QlikView Layout & Visualizations

Discussion Board for collaboration on QlikView Layout & Visualizations.

Not applicable

Improve Performance

Hi everybody, I have e Performance Issue, it takes to much to calculate between sellections I make, Is there a better way to expres this?
if
(RowNo()>1,
if
(RangeSum(Above(SUM({$<AGRUPADOR={'01_VENTAS'}>}(DATA_AVER))/SUM({$<AGRUPADOR={'01_VENTAS'}>}total DATA_AVER) , 0, NoOfRows()))>=.95,'C',
if
(RangeSum(Above(SUM({$<AGRUPADOR={'01_VENTAS'}>}(DATA_AVER))/SUM({$<AGRUPADOR={'01_VENTAS'}>}total DATA_AVER) , 0, NoOfRows()))>=0.80,'B',
if
(RangeSum(Above(SUM({$<AGRUPADOR={'01_VENTAS'}>}(DATA_AVER))/SUM({$<AGRUPADOR={'01_VENTAS'}>}total DATA_AVER) , 0, NoOfRows()))>=.50,'A',
if
(RangeSum(Above(SUM({$<AGRUPADOR={'01_VENTAS'}>}(DATA_AVER))/SUM({$<AGRUPADOR={'01_VENTAS'}>}total DATA_AVER) , 0, NoOfRows()))<=0.50,'AA'))))
,'AA')
Thank you All!!
5 Replies
Not applicable

Improve Performance

Hola Javier,

Podrías subir un QVW de ejemplo?

Not applicable

Re: Improve Performance

Si, Claro, Aquí está.

Gracias!!

MVP
MVP

Improve Performance

Hi,

Create the following expressions

Expression 1:

RangeSum(Above(SUM({$<AGRUPADOR={'01_VENTAS'}>}(DATA_AVER))/SUM({$<AGRUPADOR={'01_VENTAS'}>}total DATA_AVER) , 0, NoOfRows()))

Now use this expression in another expression like this

if(RowNo()>1,
if([Expression 1 Name]>=.95,'C',
if

([Expression 1 Name]>=0.80,'B',

if

(

[Expression 1 Name]>=.50,'A',

if

(

[Expression 1 Name] <=0.50,'AA')))),'AA')

Here we are instead of calculating the expression many times we are reusing the expression 1 in expression 2.

If you are using straight table then hide the first expression column in Presentation tab.

Regards,

Jagan.

Not applicable

Re: Improve Performance

Thank you Jagan but, It takes more time than the original expression. :/

Not applicable

Re: Improve Performance

Hola Javier,

Ya le estuve echando un ojo y esta difícil optimizarlo para el acumulado y

comparación que haces. Lo único que se me ocurre es que acumules en el

script.

Sent from my iPad

On Feb 15, 2012, at 10:18 AM, javierortiz <

Community Browser