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

Announcements
Discover how organizations are unlocking new revenue streams: Watch here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Correct usage of aggr instead of range{some}

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

0 Replies