The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi
i may be coming at this all wrong but here goes,
i have a dashboard of staff performance where the visuals are set by the selection of a name, in most cases this means that visuals only contain data relevent to that person, but i want to show their performance amongst their peers, so for this visual i made it so the Name Slicer has no effect on those values. this works as i want it to, now the icing on the cake would be to highlight the selected Agents column in a contrasting colour. In excel i have done this by creating 2 series where one contains the values for the selected agent and blanks on the rows that are not the selected agent and the other vis versa then plot them on a stacked column chart and bingo.
There is probably a better way in PBI but i am struggling to escape the filter context in the right way i think. i can make it work with a simple measure like if (agent name = "Beth","Green","Blue") and use that in the default colour on data colours, but when i try to use a dynamic value from the Slicer it fails.
any help greatfully recieved.
Thanks
Solved! Go to Solution.
Table2 is the disconnected table that feeds the slicer. You can create it in Power Query as a duplicate of Table, then choose the User column and remove duplicates.
Hi, Thanks a million for your help, in your example is table or table 2 the disconected table?
Table2 is the disconnected table that feeds the slicer. You can create it in Power Query as a duplicate of Table, then choose the User column and remove duplicates.
Hello,
It's been almost 4 years since your answer but it just woked for me so it is amazing.
I was wondering if there's any way to have this work but for multiple selections, like if you were to choose both A and B then both columns would become red and the other one would remain blue.
Every time that I select multiple options in the slicer it takes the FALSE.
Thanks
use
IN VALUES()
rather than
SELECTEDVALUE
I got this error
That's why you need to use IN VALUES
Please provide sample data that fully covers your issue.
Please show the expected outcome based on the sample data you provided.
The problem is my use of IN, I know it is not right but I am just starting to learn. This is what the measure looks like:
I got it, sorry. Used logic at first 🙂
@sbsgsaw1 use a disconnected table to feed the user slicer. Then create a measure that checks which user is selected and apply the color accordingly
Measure = if(SELECTEDVALUE('Table'[User])=SELECTEDVALUE('Table (2)'[User]),"Red","Blue")
Then use conditional formatting on the data colors for the visual
Which gives this result