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: 
anushree1
Specialist II
Specialist II

check if the value in variable matches with the value in the data

Hi,

I have a requirement wherein there is a input box which holds the value for a variable, each time a value is entered into the input box i would like to check if the entered value is present in the specific column of the data model, if there is i would like to display the sum else display NA .

So please let me know if there is a way to check whether the entered value exists in the data pool or not

1 Solution

Accepted Solutions
sunny_talwar

Maybe like this:

If(SubStringCount(Concat(DISTINCT '|' & FieldName & '|', ','), '|' & vVar & '|') = 0, 'NA'

Sum({<FieldName = {'$(=vVar)'}>} Value))

View solution in original post

3 Replies
neelamsaroha157
Specialist II
Specialist II

I am sure you are storing the input value in a variable, so you can try


Sum(If(FieldValue = vVariable ,FieldValue ))

NickHoff
Specialist
Specialist

IF(GetSelectedCount(InputboxField) = <> 0, Sum({$<FieldValue = {"=$(vVariable)"}>}Field)

sunny_talwar

Maybe like this:

If(SubStringCount(Concat(DISTINCT '|' & FieldName & '|', ','), '|' & vVar & '|') = 0, 'NA'

Sum({<FieldName = {'$(=vVar)'}>} Value))