Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I'm utilizing Qlik Sense to calculate the time it takes to process applications for our department utilizing a data connection to our application database. Unfortunately, I have to basically recalculate the processing time utilizing set analysis due to how the database is setup. I've provided a sample below.
=Sum(
{1<[Status]={"CLOSED"}>*
1<[Office]={$(vOffice)}>*
1<[Action_Date.autoCalendar.Date]={">=$(=Date(vFiscal_Year))"}>}
[Process_Time]
)
/
Count(distinct
{1<[Status]={"CLOSED"}>*
1<[Office]={$(vOffice)}>*
1<[Action_Date.autoCalendar.Date]={">=$(=Date(vFiscal_Year))"}>}
[Application_ID]
)
We have a number of different departments/programs that utilize this formula for KPI's on the same Qlik Sense sheet. I've managed to condense the formula down using variables to this:
=vSumProcessTime / vCountApps
Is there a way to be able to perform additional set analysis on these variables? For instance, I would like to add an additional parameter to each of the variables for each KPI:
<[Program]={"ProgramNameHere"}>
Can you use the P() function ? If no [Program] values have been selected, all values are available. If a [Program] value is filtered, only that program would be used in the calculation.
=Sum(
{1<[Status]={"CLOSED"}>*
1<[Office]={$(vOffice)}>*
1<[Action_Date.autoCalendar.Date]={">=$(=Date(vFiscal_Year))"},[Program] = P([Program])>}
[Process_Time]
)
/
Count(distinct
{1<[Status]={"CLOSED"}>*
1<[Office]={$(vOffice)}>*
1<[Action_Date.autoCalendar.Date]={">=$(=Date(vFiscal_Year))"}>}
[Application_ID]
)
Thank you for the reply, Jwjackso. Unfortunately, the P() function would not solve the issue in my scenario - though I will be hanging on to that function as it's quite useful, thank you!
I have a master KPI dashboard that lists all of the programs in rows and the measures (processing time, applications issued, etc.) in columns. Each program currently has its own KPI chart with embedded set analysis, which is exactly the same except for the program name. My issue comes in when needing to make any sort of adjustments to the set analysis, as I have to go and modify it for every chart, which is not super efficient at all.
I'd like to be able to have the common set analysis criteria (everything except the program name) stored as variables to plug into the charts instead with a modifier for each to have the appropriate program. Just not sure how/if possible.
Maybe variables with parameter are a practically appproach for your task. It means the following:
Sum(
{1<[Status]={"CLOSED"}>*
1<[Office]={$(vOffice)}>*
1<[Action_Date.autoCalendar.Date]={">=$(=Date(vFiscal_Year))"}, [Program]={$1}>}
[Process_Time]
)
and then you could call it with:
= $(vSumProcessTime('ProgramNameHere'))
or if you want all:
= $(vSumProcessTime('*'))
- Marcus