Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
rafaaaaa
Contributor II
Contributor II

Filter by multiple column (String) values in tmap

How can I filter by used two string column values as i need to filter on different values only?

 

for example :

I am using this filter in tmap

(row4.pivot_value.equals(row6.pivot_value))? false:true 

 

after that i am using tfilter to get true values

 

but it gives an error NullPointerException

 

is there any possible way?

Labels (2)
1 Solution

Accepted Solutions
rafaaaaa
Contributor II
Contributor II
Author

Hi,

 

this solution will fit with as some times the other columns won't be null. I have figured out a solution but creating a variale in the tmap with this code:

 

(String.valueOf(row5.pivot_value).equals(String.valueOf(row3.new_staus))) ? "0" : "1" 

 

no erros appear and after that I used filter to get the data with "1" only. it works will with me

View solution in original post

2 Replies
TRF
Champion II
Champion II

Hi,
Did you try this:
(row4.pivot_value != null && row6.pivot_value != null && row4.pivot_value.equals(row6.pivot_value))? false:true

This is your responsability to decide how to consider null values. Here, the result will be false only when both fiels are not null and equal to each other. Else the result will be false.
rafaaaaa
Contributor II
Contributor II
Author

Hi,

 

this solution will fit with as some times the other columns won't be null. I have figured out a solution but creating a variale in the tmap with this code:

 

(String.valueOf(row5.pivot_value).equals(String.valueOf(row3.new_staus))) ? "0" : "1" 

 

no erros appear and after that I used filter to get the data with "1" only. it works will with me