Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik GA: Multivariate Time Series in Qlik Predict: Get Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

decoding a expression

Hi Experts,

I am using this expression in Background color definantion of Expression tab

what it does when  some of the product types are selected in list box only they are highlighted

while other are grayed out , I want to know how this expression work ??

if(not match(only({1} [Product Type]),

$(=concat(distinct chr(39) & [Product Type] & chr(39) , ' , ' ))) , argb(200,200,200,200) )



anant

4 Replies
vadimtsushko
Partner - Creator III
Partner - Creator III

I believe best way to decode complex expression is to evaluate its less complex parts in same context.

I suppose you have chart with [Product type] as one of dimension listbox for selection in [Product type], and some expression in chart made unrelated from [Product type]?

If so - file in attachment shows how it works.

By the way in that case I would use less complex conditional, something like this:

If(not only({1} [Product Type]) = only(TOTAL [Product Type]),ARGB(200,200,200,200))

Roop
Specialist
Specialist

Vadim was almost there ... Thanks Vadim!

To get all of them highlighted and not just single values:

if(len(Only([Product Type])) > 0,

     ARGB(200,200,200,200),

     null()

)

vadimtsushko
Partner - Creator III
Partner - Creator III

I respectfully disagree

Mine is working. Have you tried yours? You can try it in my file.

vadimtsushko
Partner - Creator III
Partner - Creator III

Variation of your formula do the trick perfectly. And it is very simple too

if(IsNull(Only([Product Type])), ARGB(200,200,200,200))

Thank you that is much better then my variant.