2 Replies Latest reply: May 16, 2015 6:08 AM by Aleksander Kolodziej RSS

    Minimum with aggr

      Using a formula

      SUM(

      Aggr(COUNT({$<id_monitoring={'4_1'}>}DISTINCT Timestamp_of_filling), id_period,id_target,id_user,id_shop, Date)

           )

      I get needed numbers how many times 4_1 was filled during each day, in each shop, by each user.

       

      Using a formula

      SUM(

           Rangemin(

              Rangemax(

                  Aggr(COUNT({$<id_monitoring={'4_1'}>}DISTINCT Timestamp_of_filling), id_period,id_target,id_user,id_shop, Date)

                  ,

                  0)

              ,

              Rangemax(

                  Aggr(COUNT({$<id_monitoring={'4_2'}>}DISTINCT Timestamp_of_filling), id_period,id_target,id_user,id_shop, Date)

                  ,

                  0)

              )

      )

      I get the minor number of filling 4_1 and 4_2.

       

      But how can I get the minimum number of filling many monitorings: 4_1, 4_2, 4_3, ..... 4_n on each day, in each shop, by each user using more suitable formula?

        • Re: Minimum with aggr
          Stefan Wühl

          Maybe by using id_monitoring as an advanced aggregation (aggr() function) dimension?

            • Re: Minimum with aggr

              But if I put as en expression such a code:

               

              MIN(Aggr(COUNT(DISTINCT Timestamp_of_filling),id_user,id_shop, Date, id_monitoring))

               

              is Straight Table with Dimensions: id_period,id_target

               

              I will get the smallest number of filling any monitoring during any day in the period.

              This result is still not good. I need the minor number of filling any monitoring during each day in the period.

              And next to sum up this the smallest numbers from each day - one number from each day in the period.

               

              Thanks for response, but I still need help.