Skip to main content
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 }))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
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.