Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
soniasweety
Valued Contributor III

include if

Hi all,

I have expression  like below but I want to write the if condition  in backend how can I write?

this is original expression  = Only({$-<compltedate={"*"}>}id)

tried in script   if( Only({$-<compltedate={"*"}>},'Yes','No') as NewID

what is wrong in this expression can anyone give suggestions?

Tags (3)
1 Solution

Accepted Solutions
Chanty4u
Esteemed Contributor III

Re: include if

or else

try in simple way   which field your excluding null use that in same expression like below

=Aggr(only({<Flag1={0},Status-={'passed'}, Completedate-={' '}>} if(duration>=Critical,id,null())),id,Name)

View solution in original post

14 Replies

Re: include if

You can not write set analysis in script. Because you are excluding from current selection.. Why are you expecting in script rather we have UI itself.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
MVP
MVP

Re: include if

Set expressions do not work in script and there is no concept of current selections (the $ in the set expressions) in script. So it is not possible to do what you asked.

I suggest you explain in detail what you are trying to achieve, preferably with some data and the expected output in a sample qvw.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
soniasweety
Valued Contributor III

Re: include if

yes anil but,

in my issue there is a table with result giving the values  of other table also I want to exclude this in that table

if I use this exp in backend as field   I can write easy in front end right so am trying it.

Re: include if

Even if we need to work on the same expression to next level, of course there is some informative to do. May be explain business as your indeed

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
prma7799
Honored Contributor III

Re: include if

for this i guess you can use variable for front end part.

soniasweety
Valued Contributor III

Re: include if

issue is:

I have two tables

in one table  to show the values based on the state critical ,

second table should show the date value is null

so I want to exclude this  second table result in first table

as first table also giving total two results which I don't want.

soniasweety
Valued Contributor III

Re: include if

how can I use?

soniasweety
Valued Contributor III

Re: include if

or else I can I include the same exp in this

Only({$-<compltedate={"*"}>}id)   -----------this into below

=Aggr(only({<Flag1={0},Status-={'passed'}>} if(duration>=Critical,id,null())),id,Name)

Re: include if

Can you look Exists() and Not Exists() functions in script?

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)