Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join this live chat April 6, 10AM EST - QlikView to Qlik Sense REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
soniasweety
Master
Master

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?

1 Solution

Accepted Solutions
Chanty4u
Champion III
Champion III

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
Anil_Babu_Samineni

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)
jonathandienst

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

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.

Anil_Babu_Samineni

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

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

soniasweety
Master
Master
Author

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

how can I use?

soniasweety
Master
Master
Author

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)

Anil_Babu_Samineni

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)