Forum Discussion
Dynamic Legend on line chart - selected entity
- 1 year ago
Hi sajLGBI
You can use a disconnected table then a measure as conditional formatting to change the color of selected categories. Example:
Marker Color = IF ( NOT ( ISBLANK ( CALCULATE ( COUNTROWS ( 'Sales' ), KEEPFILTERS ( TREATAS ( VALUES ( 'Selected Region'[Region] ), 'Sales Territory'[Region] ) ) ) ) ), "red", "#4d4b47" )
Hi sajLGBI
I am not exactly sure what you want to achieve as there is no sample data and your expected result from that. But if you want to use a measure as a legend you will need a disconnected table that has the desired legend and a measure to distribute the value across these legends. Check if this works for you
Hi. Thanks for the example.
Not quite. For example each dot on the grapnh is a store, the X axis are financial years and the Y axis is value, eg sales.
Select a 'focus' store via a slicer and the graph highlights the focus store within the dots.
Thanks
- danextian1 year agoSuper User
Hi sajLGBI
You can use a disconnected table then a measure as conditional formatting to change the color of selected categories. Example:
Marker Color = IF ( NOT ( ISBLANK ( CALCULATE ( COUNTROWS ( 'Sales' ), KEEPFILTERS ( TREATAS ( VALUES ( 'Selected Region'[Region] ), 'Sales Territory'[Region] ) ) ) ) ), "red", "#4d4b47" )- sajLGBI1 year agoFrequent Visitor
Ahhh, you set the scatter chart to have a continuous X axis. Then it allows you to conditionally set the colour.
I was using textual financial years so that option disappears.
I will be able to display the FY numerically... et voila.
Many thanks