Forum Discussion
Visualization (Buttons and Slicers)
- 1 year ago
You could just create another conditional formatting measure but this time should be applied to the callout value of the buttons.
Slicer Highlight Color = IF ( SELECTEDVALUE ( MonthsOnly[Month Short] ) IN VALUES ( Dates[Month Short] ), "white" --#ffffff for hexadecimal )
Hi danextian, thanks again for your help!
The interactions are currently disabled, and there are a few reasons why I chose to do that.
I want the Month slicers to be selectable, not just displayed after clicking on a Quarter. At the same time, I need all buttons/slicers to be visible at all times. For example, when I select Q1, I want Jan, Feb, and Mar to be highlighted or selected, but I don’t want the other months to be hidden. I want all months to remain visible, regardless of the selection.
I’d really appreciate your help in figuring out how to achieve this behavior. Also just to add, a feature where I can select any months that I want without having to select a quarter is also needed. Whenever the user select a month, the respective quarter will also be selected, while the other quarter will be shown but not selected.
Feel free to let me know if more context is needed for your understanding.
Thank you!
If you disable the interaction then you can't really expect them to sync. There is currently no option to cross-highlight instead of cross-filtering the interaction between slicers. The default behaviour of a slicer to is to cross-filter even non-slicer visuals. That said, your workaround is to use dimensions that are not directly related to each other - quarter coming from the regular table and months from a months only table but still related to fact. Your diagram would look like below.
Cross-highligting will be done via conditional formatting. Create a measure that will check whether the months in MonthsOnly are currently visible in Dates table
Slicer Highlight Color =
IF (
SELECTEDVALUE ( MonthsOnly[Month Short] ) IN VALUES ( Dates[Month Short] ),
"#ADD8E6"
)
Crossfiltering/highlighting from months to quarter also uses a measure in a visual filter or conditional formatting.
Please see the attached sample pbix.