Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis and field selections behaviour

I have three fairly simple expresssions

SUM({$<SECTOR-={"ITRAXX*","CROSSOVER*"},DESK={"CDS CORPORATES"}>}[TRADE COUNT])

SUM({$<DESK={"CDS EMERGING MKTS"}>}[TRADE COUNT])

SUM({$<DESK={"BANK CAPITAL - GSL"}>}[TRADE COUNT])

they are displayed as 3 lines on a line chart

I also have the list box fields of DESK and SECTOR on the page.

My problem is that when I select the 'BANK CAPITAL - GSL' value in the DESK list box, the other two lines remain on the chart, rather than disappearing as i was expecting. Why is this? How can I get round the issue?

Incentally the same thing happens if I select 'CDS EMERGING MKTS' in the DESK list box

10 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Use GetFieldSelections(DESK)  in set analysis

SUM({$<DESK={$(=GetFieldSelections(DESK))}>}[TRADE COUNT])

Not applicable
Author

Values definded in set expression are more important than your selection in the same field.

Regards

Darek

Not applicable
Author

That is the expected behavior, because you are selecting a desk and creating a set analysis on desk field to override the selections on Desk field in the set analysis.

you might want to add conditional expression for example as

GetFieldSelections(DESK) = 'CDS CORPORATES'

Not applicable
Author

But if no selections are made, nothing will display, right? I want all 3 expressions displayed on the chart when no selections are made.

Not applicable
Author

Thanks Sudheer. Actually I don't even want the DESK and SECTOR listboxes on the page. i just need the user to be able to select which lines on the chart they want visible.

Label is 'CDS HY'

SUM({$<SECTOR-={"ITRAXX*","CROSSOVER*"},DESK={"CDS CORPORATES"}>}[TRADE COUNT])

Label is: 'CDS EM'

SUM({$<DESK={"CDS EMERGING MKTS"}>}[TRADE COUNT])

Label is 'Bank Capital'

SUM({$<DESK={"BANK CAPITAL - GSL"}>}[TRADE COUNT])

Is it possible to have those labels as buttons or in a list maybe?

Not applicable
Author

yeah, you can just use the same conditional expression concept to do the same.

Create a variable, assign the values as 1 and 0 (On and OFF) use them based on your requirement.

Not applicable
Author

Try this, you can play with the expression as per your requirement

GetFieldSelections(DESK) = 'CDS CORPORATES' or GetPossibleCount(DESK) = count(DISTINCT {1} DESK)

Not applicable
Author

What would be an example of the expression I would use in the conditional box?

Not applicable
Author

I assume this would work

GetFieldSelections(DESK)='BANK CAPITAL - GSL'

How would I amend this expression to say the it should also conditionally appear when nothing is selected in the desk field?