Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Make your voice heard! Participate in the 2020 Wisdom of Crowds® Survey. BEGIN SURVEY
Highlighted
fabrice_lattern
New Contributor II

Set analysis - operate within current selection

Hello,

I have a case where I have let say a material code and description as dimension of the chart, and I also have to filter result based on the same dimensions.

My expression is the following one :

SUM({<[ITEM CODE]={'99*'}, [ITEM DESCRIPTION] = {'*STRUCTURE*'}, [SOME OTHER FIELD]={'XXX'}>} QUANTITY }>)

As input, the user is selecting an item description. Of course with this set analysis, the selection of user is ignored ; what I want to achieve is let the user do the selection, then display nothing if the item description is not like "STRUCTURE".

Is it possible using set analysis or will I have to use if conditions ?

Thanks in advance

1 Solution

Accepted Solutions
Highlighted

Re: Set analysis - operate within current selection

You can try with Implicit Set Operators

Sum({<[ITEM CODE]={'99*'}, [ITEM DESCRIPTION] *= {'*STRUCTURE*'}, [SOME OTHER FIELD]={'XXX'}>} QUANTITY)

View solution in original post

4 Replies
Highlighted

Re: Set analysis - operate within current selection

Do you mean this?

If(GetFieldSelections([ITEM DESCRIPTION]) >0, SUM({<[ITEM CODE]={'99*'}, [SOME OTHER FIELD]={'XXX'}>} QUANTITY), SUM({<[ITEM CODE]={'99*'}, [ITEM DESCRIPTION] = {'*STRUCTURE*'}, [SOME OTHER FIELD]={'XXX'}>} QUANTITY }))

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Highlighted

Re: Set analysis - operate within current selection

You can try with Implicit Set Operators

Sum({<[ITEM CODE]={'99*'}, [ITEM DESCRIPTION] *= {'*STRUCTURE*'}, [SOME OTHER FIELD]={'XXX'}>} QUANTITY)

View solution in original post

Highlighted
fabrice_lattern
New Contributor II

Re: Set analysis - operate within current selection

You save me again This is exactly what I was looking for, an intersect operator. Very usefull indeed, as it respect user selection.

Highlighted
fabrice_lattern
New Contributor II

Re: Set analysis - operate within current selection

Hello,

Thanks for your answer but the idea was to use the user selection with an additional restriction (an intersect between user selection and the filter). Here, you use the user selection if existing, and the filter if there is no selection.