Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Cálculo de máximos y mínimos entre periodos

Hola a todos:

Soy nuevo en Qlikview y tengo un problema muy simple, que es el siguiente:

Quiero calcular los valores máximos y mínimos dentro de un rango de fechas seleccionadas y no me sale ningún valor empleando las expresiones:

Para el valor máximo:          Aggr(Max (Máximo),Ticker, Mes_Vencimiento)

Para el valor mínimo:           Aggr(Min (Mínimo),Ticker,Mes_Vencimiento)

Tabla1.png

He probado poniendo los campos Fecha en la expresión pero tampoco funciona. No me genera ningún resultado.

En cambio si me calcula el valor inicial de en la apertura de l primer día del rango de fechas y el valor de cierre del último día del rango de fechas. Con las siguientes expresiones:

FirstSortedValue(Apertura,Fecha)

FirstSortedValue(Cierre,-Fecha)

La estructura de datos es la siguiente:

estructura datos.png

Los valores que me tenían que calcular se pueden apreciar en la tabla adjunta.

Por ejemplo del DJI el máximo del periodo es 4772.56 que corresponde al día 2/8/1995 del periodo seleccionado y el mínimo sería el valor 4587.66 que corresponde al día 47/8/1995

Tabla2.png

También me gustaría saber calcular los días entre estas fechas con respecto al inicio del periodo o al final del periodo.

Saludos y muchas gracias de antemano.

2 Replies
techvarun
Specialist II
Specialist II

Please Translate and post it in english

Not applicable
Author

Hello:

I am new to Qlikview and I have a very simple problem, that is:
I want to calculate the maximum and minimum values ​​within a selected date range and I do not get any value using the expressions:

  •   maximum value:      Aggr (Max (Máximo), Ticker, Mes_Vencimiento)
  •   minimum value:      Aggr (Min (Minimo), Ticker, Mes_Vencimiento)

I tried putting the date fields in the expression but neither works. I do not generate any results.

Tabla1.png

Instead if I calculated the initial value at the opening of the first day of the date range and the closing value of the last day of the date range. With the following expressions:

  • FirstSortedValue (Apertura,Fecha)
  • FirstSortedValue (Cierre,-Fecha)

The data structure is as follows:

estructura datos.png

The values ​​that I had to figure can be seen in the accompanying table.

Tabla2.png

For example the maximum period of the DJI is 4772.56 corresponding to the day 08.02.1995 of the selected period and the minimum would be the value 4587.66 corresponding to the day 17/8/1995

I also like to know how to calculate the days between these dates with respect to the beginning of the period or at the end of the period.

Greetings and thank you very much.