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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to count backward and calculating average weeks?

Hi to all,

May someone can help me.

I have a table that has tickets and resolving areas.  I need to show the total number of resolved tickets by area, this for a certain time frame (could be week or year) , but also the average of this. What I mean is if I select from a year some specific weeks I want to obtain the average of this.

For example:

Year 2011 --> weeks 4,5,6  --> resolved tickets 10, 21, 9 --> The result of average week will be 3. So if I want the average of resolved tickets will be sum resolved tickets / average weeks (30/3 = 10)

How can I do this? Any help will be really aprreciated.

4 Replies
swuehl
MVP
MVP

Not quite sure if I understand, if you select on your data, your aggregation functions should only take your selection into account in default state.

So I would assume, that if you select on weeks 4,5,6 in year 2011, something like

= sum([Resolved Tickets]) / count(distinct [weeks])

should result in (10+21+9) / 3 = 40 / 3

Probably this is not what you want?

Not applicable
Author

Thanks a lot, it's useful. But I'm trying to save this selection on variable, so I can used it on another thing.

swuehl
MVP
MVP

You are trying to save the selection on a variable? Not sure if I understand. Are you talking about a bookmark?

You can use set analysis in your sum and count function to e.g. use a bookmark (let's call it BookMark1)

= sum( {BookMark1} [Resolved Tickets]) / count( {BookMark1} distinct [weeks])

Not applicable
Author

Thanks!

I’m going to try it.

Gissela