1 Reply Latest reply: Aug 6, 2012 3:48 PM by Jose Tos RSS

    help set analysis

    Jose Tos

      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

        • Re: help set analysis
          Jose Tos

          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

          )