0 Replies Latest reply: May 25, 2017 4:10 AM by Igor Afonin RSS

    Correct usage of aggr instead of range{some}

    Igor Afonin

      Hello all, some strange thing for me, when i using rangeavg and avg(aggr(..)..), i get two different results.

      I know about i get wrong usage, i am new and didn't know how to convert from rangeavg syntax to aggr.

       

      hereis my case,

      i get some table with

      numberdatestatus
      SR101/01/2017open
      SR201/01/2017open
      SR102/01/2017 close
      SR102/01/2017 close

      and soone

       

      i need to get super average value of statuses for all dates, with rangeavg i get desired result in @table with dimension:

      floor(

           rangeavg(

                above(

                     count({<[status]={'closed'}>} [number]),0, rowno()

                )

           )

      )

       

      but when i need to get #1 KPI and try to convert to avg(aggr i dont get desired result =(..

      floor(

           avg(

                aggr(NODISTINCT

                     count({<[status]={'closed'}>} [number])

                     ,[date]

                )

           )

      )

       

      where did i get wrong ?

      #1.png