8 Replies Latest reply: Sep 1, 2017 4:04 PM by Paul Saltzer RSS

    Function Syntax Help

    Paul Saltzer

      Hi Everyone,

      I've been going over the help files, and trying to piece together what needs to be done, and I can't figure it out.  I'm hoping someone can help me.  I have an app that contains data regarding the various tickets that come through our ticketing system.  I am trying to come up with a function that will count all the tickets that an agent was assigned at any one point in time, not just the ones that they resolved.  The fields that I believe hold the key to this are:

      Incident ID, Assigned To,  Prev Assigned To, Incident State, Prev Incident State

      According to http://help.qlik.com/en-US/sense/3.2/Subsystems/Hub/Content/ChartFunctions/SetAnalysis/set-modifiers-implicit-field-value-definitions.htm there’s an example given that I believe will meet my needs but I don’t understand the syntax which is

      sum( {$<Customer = P({1<Product={‘Shoe’}>} Customer)>} Sales )

      I came up with

      count( {$<[Assigned To] = P({1<[Prev Assigned To]={}>} [Assigned To])>} [Incident ID] )

      but that didn’t return anything.  Did I write the statement incorrectly, or is there a better way to do it? 

      When written correctly, if ticket 123456 was worked by John Doe, and then later on it was also worked by Jane Doe, it should be included in both of their counts for total number of tickets worked.

      Thanks again for all of your help.