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

selection option - "OR" instead of "AND"

Hi,

In Qlikview when i choose to fields its show me the common data to both fields ('AND').

it is possible to change the selection option to "OR" instead of "AND" ?

Thanks in advanced

1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Read this thread

http://www.qlikfix.com/2013/10/23/and-or-mode-selections-in-qlikview/

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

7 Replies
sunny_talwar

Do you have an example of what you have and what you want from it?

amiroh81
Creator
Creator
Author

Hit

his is just example (3 inline table) :

DATA:

LOAD * INLINE [Customer,model,manufactureID,genderID

John,iphone6,1,1

Ben,iphone6s,1,1

Dan,G3,2,1

Suzi,S7,3,2

Michel,iphone7,1,2

];

manufacture:

LOAD * INLINE [manufactureID,manufacture

1,apple

2,lg

3,samsung

];

gender:

LOAD * INLINE [genderID,gender

1,male

2,female

];

if i will choose apple+female i will get only 1 row =    

Customermodelgendermanufacture
Micheliphone7femaleapple

But i want to see the following data :

    

Customermodelgendermanufacture
Beniphone6smaleapple
Johniphone6maleapple
Micheliphone7femaleapple
SuziS7femalesamsung

the first example bring me Apple 'AND' Female,

The secound one bring me Apple 'OR' Female.

Thanks

vinieme12
Champion III
Champion III

Read this thread

http://www.qlikfix.com/2013/10/23/and-or-mode-selections-in-qlikview/

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Anonymous
Not applicable

You also could experiment with expressions like that:

only({1<model=P({<gender=>} model)>  + 1<gender=P({<model=>} gender)> } gender


amiroh81
Creator
Creator
Author

Hi,

this solution help me on specific Example.

but when i try to implement on my model i got:

"Error: Error in set modifier ad hoc element list:',' or ')' expected:"

to vSelection.Or .

do you know Why?

vinieme12
Champion III
Champion III

can you post the expression for the variable

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
amiroh81
Creator
Creator
Author

Hi,

This is the Variable:

=$(=

Concat(DISTINCT {<[$Field]-={$(vSelection.IgnoreFields)}>}

'If(GetSelectedCount([' & [$Field] & ']) > 0, ' & chr(39) &

'<[' & chr(39) & ' & Concat(DISTINCT  {<[$Field]={"*"} -

{'& chr(36) & '(vSelection.IgnoreFields)} - {' & chr(39) &

[$Field] & chr(39) & '}>} [$Field], ' & chr(39) & ']= ,[' &

chr(39) & ') & ' & chr(39) & ']= > + ' & chr(39) & ')' , '  & ') 

)

i found that when i choose the name of the field on $Field then the Variable Displayed correct.

But if i not choose the name of the field on $Field the Variable  show '-' .


On the other hand in the Example on top i dont need to choose the field on $Field.

Have an idea of the cause of the problem?