Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
You can try with Implicit Set Operators
Sum({<[ITEM CODE]={'99*'}, [ITEM DESCRIPTION] *= {'*STRUCTURE*'}, [SOME OTHER FIELD]={'XXX'}>} QUANTITY)
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 }))
You can try with Implicit Set Operators
Sum({<[ITEM CODE]={'99*'}, [ITEM DESCRIPTION] *= {'*STRUCTURE*'}, [SOME OTHER FIELD]={'XXX'}>} QUANTITY)
You save me again This is exactly what I was looking for, an intersect operator. Very usefull indeed, as it respect user 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.