Forum Discussion
Using a slicer to highlight a value while that same slicer filters other visuals
Hi VistaVega
Here's an adjusted version of your measure that might work better for your scenario:
ScatterGraphColorFormatting =
VAR _selectedSupplier = SELECTEDVALUE('supplier_table'[name], "None")
RETURN
IF(
'supplier_table'[name] = _selectedSupplier,
"black", // Highlight color
"blue" // Default color
)
This measure simplifies the logic by directly comparing the current row's supplier name against the selected supplier from the slicer. If they match, the measure returns "black" (or any other color you wish to use for highlighting), otherwise, it returns "blue" (or your default color).
Best Regards
Jayleny
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Thanks for your reply! The issue I get with your adjustments is that I cannot directly reference
'supplier_table'[name]
in the IF-statement. If I try to use a harvesting function like MAX('supplier_table'[name]) to access the name column, everything becomes black because the name column has already been filtered by the supplier slicer.
If instead I try to remove the filter by doing ALL('supplier_table'[name] = _selectedSupplier, I get an error because the IF-statement only expects 1 value. I tried using the combination of MAXX and ALLSELECTED or ALL to access the unfiltered column, but if I do that the entire graph becomes black, and that's where I get stuck..