Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
quiquegzz
Partner - Contributor III
Partner - Contributor III

Optimizar Set analysis IF


Hola.

Tengo este Set Analysis.pero responde lento.

Sum(If(Num(Date#(CurrentDate))-Num(Max(PreviousDate)) >= 5 and Num(Date#(CurrentDate))-Num(Max(PreviousDate)) <  20 , Amount,0))

Hay alguna manera de optimizarlo como Set Analysis.

Gracias,

2 Replies
mrooney
Contributor III
Contributor III

Hola Enrique,

prueba esto. Yo diría que tiene que ir mejor.

vLowerLimit = Num(Date(CurrentDate)-Num(Max(PreviousDate) +5

vHigherLimit = Num(CurrentDate)-Num(Max(PreviousDate)) + 20

Sum({$<CurrentDate={">=$(vLowerLimit) <=$(vHigherLimit)"}>} Amount)

Revisa los paréntesis, no he tenido tiempo de comprobarlos.

Saludos.

quiquegzz
Partner - Contributor III
Partner - Contributor III
Author

dejame revisarlo