Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Filter in script

Morning I am trying to do the following :

I have :

Sales_Person, Question, Answer

John, Feedback,

Sarah, Quality, Positive

Ramesh, Delivery, Negative

Alfred, Feedback,

Tom, Feedback, Positive

Effectively I want to filter out in script any rows where Question = ‘Feedback’ and answer has not been filled in i.e len(answer)<1

So it should return :

Sarah, Quality, Positive

Ramesh, Delivery, Negative

Tom, Feedback, Positive

9 Replies
prma7799
Master III
Master III

Try this???

Or

there is other way to do it...

Anil_Babu_Samineni

May be use len(answer) >0 instead of yours

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
maxgro
MVP
MVP

load * inline

[

Sales_Person, Question, Answer

John, Feedback,

Sarah, Quality, Positive

Ramesh, Delivery, Negative

Alfred, Feedback,

Tom, Feedback, Positive

]

Where

  Question = 'Feedback'

  AND len(trim(Answer)) = 0

;

Anonymous
Not applicable
Author

Just to be clear the requirment is * IF question = feedback AND len(answer)=0 )

Anonymous
Not applicable
Author

I only want to filter these rows where the two conditions are met i.e ;

Question = 'Feedback' and len(answer) =0

prma7799
Master III
Master III

What is your expected output...

prma7799
Master III
Master III

Try this .....

Where len(Answer) <> 0 and Question  <> 'Feedback'

vinieme12
Champion III
Champion III

IF you want to do this in the Chart then your expression should be as below

=Count(if(Question = 'Feedback' and len(trim(answer))=0,1,0))

or

Count( {<Sales_Person={"=len(trim(Answer))=0"},Question ={'Feedback'}>}  Sales_Person)

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
maxgro
MVP
MVP

add a NOT to my previous answer

Where

NOT (

Question = 'Feedback'

  AND len(trim(Answer)) = 0

   )

;

1.jpg