Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

Highlighted
Not applicable

How do you write an expression with a modifier between x and y values?

Hi

=sum({1<Area={'UK'}, Contractor={0},Op_Week={">=$(=$(vMaxCompleteOpWk)-4)"} >} [Issued])

/sum({1<Area={'UK'}, SubcontractorType={0},Op_Week={">=$($(=vMaxCompleteOpWk)-4)"}>}  Declared)

I am trying to write an expression based on the one below to return data where the Op_Week is between vMaxCompleteOpWk and vMaxCompleteOpWk-4.  Any help would be welcome

Thanks

4 Replies
chematos
Valued Contributor II

How do you write an expression with a modifier between x and y values?

try this,

=sum({1<Area={'UK'}, Contractor={0},Op_Week={'$(<=$(vMaxCompleteOpWk))'},

Op_Week={'$(>=$(vMaxCompleteOpWk)-4)'} >} [Issued])

/sum({1<Area={'UK'}, SubcontractorType={0},Op_Week={'$(<=$(vMaxCompleteOpWk))'},Op_Week={'$(>=$(vMaxCompleteOpWk)-4)'}>}  Declared)

Hope this helps

Regards,

Chema

Not applicable

How do you write an expression with a modifier between x and y values?

Hi Chema

Thank you for your help. Unfortunately the expression did not return any results .

Regards

K

Not applicable

How do you write an expression with a modifier between x and y values?

Hi Chema

Think I have the solution

=sum({1<Area={'UK'}, Contractor={0},Op_Week={">=$(=$(vMaxCompleteOpWk)-4)"} *{"<=$(=$(vMaxCompleteOpWk))"} >} [Issued])/sum({1<Area={'UK'}, SubcontractorType={0},Op_Week={">=$($(=vMaxCompleteOpWk)-4)"} *{"<=$(=$(vMaxCompleteOpWk))"}>}  Declared)


Regards

K

chematos
Valued Contributor II

How do you write an expression with a modifier between x and y values?

Hi kathryn,

I´m glad you get this! I knew it was something like that but usually when you use a comma ',' that must do a logic AND, but I´m seeing that sometimes the solution is with '*' like you did.

Regards,

Chema