Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
QlikWorld 2020: Join us May 11 - 14, 2020 in Phoenix, AZ. Register early and save $400. Learn More
Highlighted
martyn43
New Contributor II

Developing Nested Parameterised Expressions

Good morning all,

I am trying to develop a set of nested paramerised expressions sharing multiple parameters ($1, $2, $3 and $4) across the set but I cannot get the nesting to work. When used in their full form (manually expaned) they all work OK.


My objective is for the final set to provide flexibility across multiple processes and so ease future application development / maintenance.

eReceived =

(Num(

Sum( { $ < $1, [Date] = {'<=$(vLatestDate)'}, [_Type] = {'StoresMetric'}, $2, $3 > } [# Received])

,'#,##0'))


eFailureLinesEO  =

(Num(

If(

$(vIncludeEOs), Sum( { $ < $1, [Date] = {'<=$(vLatestDate)'}, [_Type] = {'FailureItem'}, $2, [Excused Occurance] = {'-1'}, $4 > } [# Lines])

, 0)

,'#,##0'))

eProcessed =

(Num(

(

Sum( { $ < $1, [Date] = {'<=$(vLatestDate)'}, [_Type] = {'StoresMetric'}, $2, $3 > } [# Processed])

+

$(FailureLinesEO)

)

,'#,##0'))

eProductivity =

(Num(

(

$(eProcessed)

)

/

$(eReceived)

,'##0.0%'))

The intended usage for parameters is as follows:

$1 an optional shared parameter to (optionally) select sets which represents a particular Year e.g. [Year] = {$(vTY_Year)}

$2 a second shared parameter typically to be used with a Date related Flag e.g. [_TY_YTD] = {1}

$3 a dedicated parameter (used within one expression) to (optionally) select a set which represents a process area e.g.  [Process] = {'$(vProcess)'}

$4 an optional dedicated parameter (used within another expression) to (optionally) select a set which represents a process failure e.g. [Failure Point] = {'$(vFailurePoint01)'}

  • Is this all achievable using Qlikview?
  • Am I able to default one or more $1, $4, etc parameters when they are not required and if so what represents best practice?

     $(eFailureLinesEO( [_TY_YTD] = {1}, '', '', [Failure Point] = {'$(vFailurePoint01)'})) seems to work OK

  • What issues will I face if deploying such expressions across charts and other objects using various dimensions?

Thanks in advance for any help / advice offered.