Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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
Master II
Master II

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
Master II
Master II

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 >)*(<

edwin
Master II
Master II

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
Master II
Master II

np

priya0323
Contributor
Contributor

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

I am new to Qlikview!

edwin
Master II
Master II

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
Master II
Master II

yw