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

If Get Current Selection = this, exclude this

Hi,


I need to create an expression in a dimension that when one vale is selected, it will exclude the field of another dimension. For example,

Dimension 'TM Type' has two dimensions, TM and SAM

if TM Type SAM is selected, then the dimension, Adjustment Type, needs to exclude and adjustment call 'TM Adjustment' from the sales table.

T His is what I have below but any help would be appreciated.

=if(GetCurrentSelections([TM Type],'SAM'), Not Match([Adjustment Type],'TM Adjustment'),[Order - Adjustment Type])

PS: tried this in the measure but it hit performance pretty bad.

1 Solution

Accepted Solutions
Anonymous
Not applicable

Maybe this:


=if(GetCurrentSelections([TM Type],'SAM'),

//IF TRUE

{<Adjustment Type="<>TM Adjustment">}Adjustment Type,

//IF FALSE

Order - Adjustment Type

)


this part -> {<Adjustment Type="<>TM Adjustment">}

will filter all the [ Adjustment Type ] that are "<>TM Adjustment" ( different than string ) and then use the value followed to work the table.


Double quotes means expression. Single quote means actual string.

View solution in original post

3 Replies
Anonymous
Not applicable

Maybe this:


=if(GetCurrentSelections([TM Type],'SAM'),

//IF TRUE

{<Adjustment Type="<>TM Adjustment">}Adjustment Type,

//IF FALSE

Order - Adjustment Type

)


this part -> {<Adjustment Type="<>TM Adjustment">}

will filter all the [ Adjustment Type ] that are "<>TM Adjustment" ( different than string ) and then use the value followed to work the table.


Double quotes means expression. Single quote means actual string.

uko223
Contributor III
Contributor III
Author

Hi Felipe, thanks so much for your help. When I paste in that expression, I get "Error in expression:) expected"

Not sure why.

Anonymous
Not applicable

I use a mac, my server is down right now, i will look into it as soon as possible. but please, read the final lines from the comment, maybe it can help.