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: 
joeybird
Creator III
Creator III

if on same column - qlik sense

hi

I have this in a filter pane

trying to do an if on same column, with no joy

if(match([Department],'Catering','Homeware'),'x',if([Department]=Catering','y','OTHER'))

I cant seem to get y to appear

any help team please

8 Replies
jpenuliar
Partner - Specialist III
Partner - Specialist III

'Catering' is already qualified as 'X' based on the IF condition, therefore 'Y' for 'Catering' does not appear

antoniotiman
Master III
Master III

When result will be 'y' ?

If Department='Catering' then Expr='x'.

joeybird
Creator III
Creator III
Author

Hi

I just wanted if someone selected x, they would get both those departments

Catering and Homeware

and if they select Y they would get just catering

the rest other, as trying to make a simple quick select filter pane...

is there another method you can suggest please?

Anonymous
Not applicable

If there a single quote missing before Catering :

    if(match([Department],'Catering','Homeware'),'x',if([Department]='Catering','y','OTHER'))

joeybird
Creator III
Creator III
Author

Hi

that was a typo on this forum,

still does not work

please help

antoniotiman
Master III
Master III

May be this :

In Script

LOAD * Inline [
Department,Flag1,Flag2
Catering,y,y
Homeware,x,x
Catering,x,x
]
;

Expression Filter

=Aggr(Only({<Flag1=P(Flag2),Flag1>} Flag1),Flag1)

joeybird
Creator III
Creator III
Author

Hi

this code, wont achieve the 'other' selection

menu should show

x, y, other

please help

antoniotiman
Master III
Master III

LOAD * Inline [
Department,Flag1,Flag2
Catering,y,y
Homeware,x,x
Catering,x,x

Dep1,Other,Other

Dep2,Other,Other

];