Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

kathy_parker
New Contributor

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

Re: Expression Needed

Try:

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

- Marcus

MVP
MVP

Re: Expression Needed

May be this:

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

nitin_01
Contributor

Re: Expression Needed

Hi Kathy,

Try this:

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

if not please elaborate your query.

Regards

kathy_parker
New Contributor

Re: Expression Needed

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.

MVP
MVP

Re: Expression Needed

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

kathy_parker
New Contributor

Re: Expression Needed

‌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?

MVP
MVP

Re: Expression Needed

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.

rgvavihs
Valued Contributor

Re: Expression Needed

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

kathy_parker
New Contributor

Re: Expression Needed

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!)