Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set Analysis

Hi all,

Can anyone explain what the below expression means.

=Sum( {$<DefectName={$(Defect)},LensKey>} LensPosX )

Regards

Venkat

Sum( {$<DefectName={$(Defect)},LensKey>} LensPosX )Sum( {$<DefectName={$(Defect)},LensKey>} LensPosX )
4 Replies
swuehl
MVP
MVP

Some all LensPosX values where DefectName equals a value given by variable $(Defect).

Disregard any selections on LensKey field (edit: but regard current selection on other fields)

(I would have used "LensKey=" in the set expression, but I took notice that this might work also, at least in some versions of QV).

Hope this helps,

Stefan

Not applicable
Author

hi ,

What i am trying is to get Sum of LensPosX i.e;

Sum of LensPosX based on DefectName equals to $(Defect) and its Possible LensKey(Not all LensKey, Only Possible LensKeys).

So, how can i write an set analysis expression for this.

Regards

venkat

Not applicable
Author

For example:

Sum ({$} Sales) Returns total sales within your application , disregarding selections but not the dimension.

swuehl
MVP
MVP

Not 100% if I fully get your requirement, but if your both fields are somehow linked, and you set the DefectName and clear the Lenskey, this should already give you only the possible values for Lenskey, ah, maybe except those values are limited by another field.

So it will depend on your data model, but withouf trying myself, you could think about something like:

=Sum( {$<DefectName={$(Defect)},LensKey=p( {1<DefectName = {$(Defect)}>} ) >} LensPosX )

So I explicitely select for LensKey all possible values for a selection of DefectName = $(Defect), with all other field selections disregarded.

Maybe like this?