Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
phongnnguyen
Contributor II
Contributor II

Filter with conditional in set analysis

Hi there,

I have a problem with my set. I want to just filter all row which have status "Old" . Like below example:

My original straight table is:

IDvaluestatus
a11123

Old

b11456Old
c11789New

with status is a Variable $(v_status): if(createdate>'01/01/2018','new','old')

and this is what I want to show

Header 1Header 2Header 3
a11123Old
b11456Old

Thanks for your help

13 Replies
yenumulagopi
Contributor III
Contributor III

Hi Phong,

Please find the attachment. May be it will help you

Thank You,

Gopi

nishanthi_8
Creator
Creator

=only({<status={'$(v_status)'}>}status) , provided in v_status variable the value is 'old'

ChennaiahNallani
Creator III
Creator III

try like below

Load

ID,

value,

if(createdate>'01/01/2018','new','old') as Status

from table....

variable

Capture1.PNG

Table Fileds,

ID

value

=$(vStatus)

and in Properties Uncheck Include null values in all fields.

Capture.PNG

Anil_Babu_Samineni

What is the variable storing? Can you share that value with me.

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
phongnnguyen
Contributor II
Contributor II
Author

thanks your help, but My variable v_status is: if(createdate>'01/01/2018','new','old')

phongnnguyen
Contributor II
Contributor II
Author

my variable v_status is if(createdate>'01/01/2018','new','old'). thanks for your consider

ChennaiahNallani
Creator III
Creator III

try like below

Load

ID,

value,

if(createdate>'01/01/2018','new','old') as Status

from table....

variable

Capture1.PNG

Table Fileds,

ID

value

=$(vStatus)

and in Properties Uncheck Include null values in all fields.

Capture.PNG

nishanthi_8
Creator
Creator

So createdate contains many dates right ? Which one it is comaparing against '01/01/2018' if you use it in the textbox? So better add date dimension to the table so that you will get clear view.So try with the simple expression like this :

     if(createdate<01/01/2018','old')

phongnnguyen
Contributor II
Contributor II
Author

thanks for your reply but I dont know why uncheck include null value of ID column . I think your way will be working if can uncheck in v_status column