Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi,
I'm aware of how to use a slicer to highlight values instead of filtering. My issue is somewhat different: I want my slicer to fulfill both the functions of filtering and highlighting. To Sketch the situation a little bit: I have a slicer allowing the user to select a supplier, and I have 2 visuals: bar chart A and scatter plot B.
Bar Chart A shows supplier lead time in months, and is filtered by the slicer. Scatter plot B shows the rank of a supplier compared to their competition, and has as its "values" the supplier names. By necessity, interaction between the slicer and Scatter Plot B are turned off. What I'm trying to make happen is that when a user selects a supplier from the slicer, that Visual A is properly filtered, while Visual B remains unfiltered but does highlight the selected supplier.
I've been trying everything I can think of, but my Formatting measure returns TRUE or 1 for every single value no matter what I do. It seems that I'm not correctly removing the slicer's filtering of the supplier within the measure. For reference, below is my most recent attempt at the measure.
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..
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
70 | |
55 | |
38 | |
31 |
User | Count |
---|---|
71 | |
64 | |
64 | |
49 | |
45 |