Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
Use GetFieldSelections(DESK) in set analysis
SUM({$<DESK={$(=GetFieldSelections(DESK))}>}[TRADE COUNT])
Values definded in set expression are more important than your selection in the same field.
Regards
Darek
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'
But if no selections are made, nothing will display, right? I want all 3 expressions displayed on the chart when no selections are made.
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?
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.
Try this, you can play with the expression as per your requirement
GetFieldSelections(DESK) = 'CDS CORPORATES' or GetPossibleCount(DESK) = count(DISTINCT {1} DESK)
What would be an example of the expression I would use in the conditional box?
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?