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: 
Anonymous
Not applicable

Expression Needed

I have a field called Queue names and a field called Queue Calls.  I need the sum of queue calls when the queue name is "Billing Q".  How would I write that expression?

14 Replies
marcus_sommer

Try:

sum({< [Queue names] = {'Billing Q'}>} [Queue Calls])

- Marcus

sunny_talwar

May be this:

Sum({<Queue = {'Billing Q'}>} [Queue Calls])

nitin_01
Creator
Creator

Hi Kathy,

Try this:

             Sum({<Queue names={'Billing Q'}>}[Queue Calls])

if not please elaborate your query.

Regards

Anonymous
Not applicable
Author

For some reason, the results are return the value x 7 (I have a total of 7 queues). 

My answer should be 5117 but, instead it is 35819.

sunny_talwar

Make sure the name of the field match case-to-case. Is the field called Queue Names or Queue names?

Anonymous
Not applicable
Author

‌thanks!! That worked.   Now... if I want to add set analysis to populate just the current year's values,  what would I add to this expression?

sunny_talwar

Like this:

Sum({<Queue = {'Billing Q'}, Year = {$(=Max(Year))}, Month, MonthYear, Quarter, QuarterYear, Week, Date>} [Queue Calls])

All the fields in red are the other date related fields where you might want to make selection but would not want your expression to be impacted with. So, if you add them in your expression, all the selections will be ignored in those fields.

Anonymous
Not applicable
Author

Sum({<Queue Name ={'Billing Q'}>}[Queue Calls])

Anonymous
Not applicable
Author

Sunny, Awesome!  So this will pull in 2016 or the current year.  What do I use for adding a measure for the previous year? (Thank you for your help!)