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

Button and filter in two field

Hello,

I want to know if it's possible to filter in two field with a button like this :

Field1 = Field2

I want to filter records where field2 contain field1 values.

Exemple (after filter i want to show only the red values) :

Field1Field2
Value1
ValValue1
ValValueXX
Value2

Thank for your help

18 Replies
Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Well, this is not so much about QlikView, as it is about merging data from different sources.

Your SQL SELECT statement will get performed on your database, QlikView is just passing the syntax back to the database. Obviously, your database knows nothing about your Excel spreadsheet.

However, using QlikView script capabilities, you can create a string that contains a list of relevant values that you can then use in your SQL SELECT statement. So for example, if you wanted something like this:

SQL SELECT Field1, Field2 FROM ...

Where Field1 IN ('A', 'B', 'C')

you could create a variable that holds the list of the values, with the single quotes in it, and use the variable in your SQL SELECT:

LET myVar = CONCAT( ... );

SQL SELECT Field1, Field2 FROM ...

Where Field1 IN ($(myVar))

It takes quite a bit of work to build the actual solution for you, but then it would be called consulting, wouldn't it? However, this is a direction that should take you to the solution.

cheers,

Oleg Troyansky

Not applicable
Author

For your information, values are not real, i made a file exemple.

https://drive.google.com/file/d/0B_KydpDcKkXBeTNPdDRlcWRJX1U/edit?usp=sharing

Not applicable
Author

Ok, i understand...

So, QlikView is a good tool to work with different database (sql, xls, csv....) but it's not the best tool for modulating data?

I'm right?

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

It's a matter of personal preference, but personally I'd disagree. In my practice, QlikView is an excellent tool for anything related to ETL, including data modeling and dimensional modeling. As with any tool, one needs to know what one is doing, especially for any complex issues.

Not applicable
Author

I understand your feeling, but i found that QlikView is not as logical as other languages like C+, VB, VBA, PHP...

QlikView is using specific code, specific objects, many specific things.

I'm not saying that QlikView is too bad, i just want to say that this tool is hard to understanding when you are accustomed to develop with others languages.

vikasmahajan

PFA Sample Application for the same.

Vikas

Hope this resolve your issue.
If the issue is solved please mark the answer with Accept as Solution & like it.
If you want to go quickly, go alone. If you want to go far, go together.
ashwanin
Specialist
Specialist

You can create Flag for the records which are equal and which are not equal. with Yes or No

Select Yes to check the record which are matching and no for the records which are not matching .

sudeepkm
Specialist III
Specialist III

I would suggest to compare QlikView with other BI tools instead of comparing it to a language.

I think the most important thing is to identify the requirement properly then select whether a BI Tool or ETL tool or an Application developed using language can provide the solution.

It is also important to look at things from a high level covering all the factor associated to it.

Not applicable
Author

Attached with answer. I created a field called CommonField. If you select 1 in it, it will give you the results you are looking for.

Please let me know if you have any other questions.

Thanks

AJ