Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
RK121
Contributor III
Contributor III

Set Analysis (AVG Aggr)

Hello community,

Calculate YTD - Average:

I am trying to apply set analysis on the table to calculate the Average Count for different types of tickets by Users for the current year.

I also have Couple types of Ticket Action.

I am using this formula, but it doesn't calculate avg for current year per User, per Ticket Action.

=Avg(Aggr(count({$<Year={'=Year(Today())'} >}([Trouble Ticket ID])),[Ticket Action],User))
/
num(Month(now()))

RK121_0-1666107826701.png

 

1 Solution

Accepted Solutions
aschuchner_chicagoatlantic

It looks like you have a problem in your set analysis. It cannot evaluate a formula unless you do it with a $ expansion. Try this:

=Avg(Aggr(count({$<Year={'$(=Year(Today()))'} >}([Trouble Ticket ID])),[Ticket Action],User))

 

View solution in original post

2 Replies
aschuchner_chicagoatlantic

It looks like you have a problem in your set analysis. It cannot evaluate a formula unless you do it with a $ expansion. Try this:

=Avg(Aggr(count({$<Year={'$(=Year(Today()))'} >}([Trouble Ticket ID])),[Ticket Action],User))

 

RK121
Contributor III
Contributor III
Author

Works!Thank you!