
Advanced Search  search in two variables in one formula (OR)
Brandon Apperson Mar 13, 2012 4:11 PM (in response to Marcin Dworak)I am slightly confused by what you are aiming to do...
If you want one variable in which to search you could, in your script, try Var1 & Var2 as VarCombined then search for parts of VarCombined you are looking for.
But otherwise the statement you have above should work...For example in your script you could include:
Where
(Wildmatch([Var1],'41','45','39','7000064','7000042') OR Wildmatch([Var2],'12','31','32','49','51'))
Would give you all results where Var1 or Var2 matched the parameters listed.
Otherwise are you looking to "search in" like a regular expression because that can be solved by
using wildmatch but using the * rather than the % in SQL. e.g. wildmatch([Var1],'70*') would give you all results starting in 70 with anything after it.
Hope this helps!

Advanced Search  search in two variables in one formula (OR)
Marcin Dworak Mar 14, 2012 9:23 AM (in response to Brandon Apperson)Hi,
Well, I could do the things you mention but I don't have the access to the script (cannot edit it) and are not allowed to create any new variables so VarCombined is off limits as well. I've tried to filter on '1' in:
=if(Match([Var1],'41','45','39','7000064','7000042') OR Match([Var2],'12','31','32','49','51')),1,0)
but this doesn't work properly as well, as I think that the formula would have to be defined as a new variable for me to be able to filter on it.
Thanks,
Marcin

Advanced Search  search in two variables in one formula (OR)
Celambarasan Adhimulam Mar 14, 2012 9:33 AM (in response to Marcin Dworak)Hi,
It will work.Wat result it shows now?
=if(Match([Var1],'41','45','39','7000064','7000042') OR Match([Var2],'12','31','32','49','51'),1,0)
Celambarasan

Advanced Search  search in two variables in one formula (OR)
Marcin Dworak Mar 14, 2012 9:44 AM (in response to Celambarasan Adhimulam )Hi,
When I hit on '1' in the table it gives me just the line I've hit i.e. if Var1= 41 and Var2=10 then it will apply those two filters to the report.
Thanks,
Marcin

Advanced Search  search in two variables in one formula (OR)
Celambarasan Adhimulam Mar 14, 2012 9:53 AM (in response to Marcin Dworak)Hi,
That was the qlikview functionality.
If you need all the ones then have a list box with this expression.From there you select 1 and 0 then it will list all the ones and zero's.
Celambarasan

Advanced Search  search in two variables in one formula (OR)
Marcin Dworak Mar 14, 2012 9:59 AM (in response to Celambarasan Adhimulam )Celambarasan,
I think this actually works, I've tried that before but I've added the formula in the expressions tab which caused the list box to be empty. Now I've put it as <expression> in the fields section "General" tab and it seems to work fine.
Thank you very much,
Marcin




