Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
chematos
Specialist II
Specialist II

help set analysis

Hi, I have a problem with this expression.

I´m getting the date wich there was the max value of one process, this is working fine but there is this limitation:

this date must be between the week selected and 12 moths before, so SemanaEjercicioMax={'<=$(=CIM.SemanaEjercicio)'}, is to control that date is before the week selected and it´s working, the problem is that Fecha_Maximo={'>=$(=AddMonths(min([CIM.%Fecha]),-11))'}, doesn´t work, is like the blue condition void the red condition...

aggr

(

FirstSortedValue

          (

          {<CIM.PERIODO=,CIM.Mes=,CIM.AñoDomingo=,

          Fecha_Maximo={'>=$(=AddMonths(min([CIM.%Fecha]),-11))'},   // 12 months before, I do min(CIM.%Fecha) because the selection must be a week.

          SemanaEjercicioMax={'<=$(=CIM.SemanaEjercicio)'}, // week <= week selected

          CIM.Semana=,CIM.SemanaEjercicio=,Fecha_Maximo=, SemanaMax_CIM=, SemanaCIM=>}

          Fecha_Maximo, -Cantidad_mkgl_Maxima

)

,Supervisor_Maximo,Proceso_PSCIM_Maximo

)

Thank you, regards.

Chema

1 Solution

Accepted Solutions
chematos
Specialist II
Specialist II
Author

Solution:

aggr

(

FirstSortedValue

          (

          {<CIM.PERIODO=,CIM.Mes=,CIM.AñoDomingo=,

Fecha_Maximo={'>=$(=AddMonths(min([CIM.%Fecha]),-11)) <=max([CIM.%Fecha])'}

          CIM.Semana=,CIM.SemanaEjercicio=,Fecha_Maximo=, SemanaMax_CIM=, SemanaCIM=>}

          Fecha_Maximo, -Cantidad_mkgl_Maxima

)

,Supervisor_Maximo,Proceso_PSCIM_Maximo

)

View solution in original post

1 Reply
chematos
Specialist II
Specialist II
Author

Solution:

aggr

(

FirstSortedValue

          (

          {<CIM.PERIODO=,CIM.Mes=,CIM.AñoDomingo=,

Fecha_Maximo={'>=$(=AddMonths(min([CIM.%Fecha]),-11)) <=max([CIM.%Fecha])'}

          CIM.Semana=,CIM.SemanaEjercicio=,Fecha_Maximo=, SemanaMax_CIM=, SemanaCIM=>}

          Fecha_Maximo, -Cantidad_mkgl_Maxima

)

,Supervisor_Maximo,Proceso_PSCIM_Maximo

)