Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Shinigaloo
Contributor III
Contributor III

IF ELSE STATEMENT

Hello everyone ,

Please i have a trouble with this statement :

=Num(Count(if(aggr(money(Sum({($<Date= {">=$(=$(vDateDebFormat))"}>) * ($<Date= {"<=$(=$(vDateFinFormat))"}>)*($<[Type Service demandé]= {'Messagerie vocale'}>)* <[USER_MEVO]= {'1'}>} NbAppel),'# ##0 ;-# ##0 ')<>0,ID_UTI),0))
/Count(DISTINCT {$<activation_uti= {">=$(=$(vDateDebFormat))"}> * <activation_uti= {"<=$(=$(vDateFinFormat))"}> * <[USER_MEVO]= {'1'}>} ID_UTI),'#,%')&chr(10)&'Avec usage'

I want to show 0% ,  if the condition into statement is not valid , how can i do this ?

Please help me

1 Solution

Accepted Solutions
edwin
Specialist III
Specialist III

i would first validate the individual expressions like 

Sum({($<Date= {">=$(=$(vDateDebFormat))"}>) * ($<Date= {"<=$(=$(vDateFinFormat))"}>)*($<[Type Service demandé]= {'Messagerie vocale'}>)* <[USER_MEVO]= {'1'}>} NbAppel)

i suspect the operation between the sets may be erroneous especially using brackets to separate the sets >)*(<

View solution in original post

8 Replies
edwin
Specialist III
Specialist III

i would first validate the individual expressions like 

Sum({($<Date= {">=$(=$(vDateDebFormat))"}>) * ($<Date= {"<=$(=$(vDateFinFormat))"}>)*($<[Type Service demandé]= {'Messagerie vocale'}>)* <[USER_MEVO]= {'1'}>} NbAppel)

i suspect the operation between the sets may be erroneous especially using brackets to separate the sets >)*(<

View solution in original post

edwin
Specialist III
Specialist III

also these sets can be translated into just 1:

Sum({($<Date= {">=$(=$(vDateDebFormat))<=$(=$(vDateFinFormat))"}, [Type Service demandé]= {'Messagerie vocale'}, [USER_MEVO]= {'1'}>} NbAppel)

separating them by comma is the same as an AND especially since they have different fields anyway

Shinigaloo
Contributor III
Contributor III
Author

thank you edwin for you responses 🙂

 

edwin
Specialist III
Specialist III

np

priya0323
Contributor
Contributor

Can you please help me in understanding the use of * to separate the sets?

I am new to Qlikview!

edwin
Specialist III
Specialist III

modifiers (anything inside the <> ) specify the criteria for the data set you wish to apply an operation against (sum, count, etc..)

* is an operation done on 2 data sets which is an AND operation.  this is a very good reference for set analysis:

LivingQlik Roots: The Ultimate QlikView Set Analysis Reference - Living Qlik (livingqlikview.com)

priya0323
Contributor
Contributor

Thank you so much Edwin !

edwin
Specialist III
Specialist III

yw