Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
fabrice_lattern
Contributor III
Contributor III

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
sunny_talwar

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
Anil_Babu_Samineni

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 }))

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

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)
sunny_talwar

You can try with Implicit Set Operators

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

fabrice_lattern
Contributor III
Contributor III
Author

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

fabrice_lattern
Contributor III
Contributor III
Author

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.