Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hi
I implemented a suggestion found here in the forums. I must be doing something wrong. It's not working.
I have a chart that lists some values for each country in a region. In the example, it's Latin America. I want to highlight Brazil by coloring it red, while keeping the other values grey.
Based on the example I've seen, I did the following:
1) Created a separate and disconnected table ("tableCountry") of just the countries that form the y-axis of the chart ("Lists[Country]") ;
2) Created a slicer with the countries from "tableCountry"
3) Created a measure as follows:
Solved! Go to Solution.
Just checked out your sample file. The problem is that the country names in the 'tableCountry' table don't match the country names in the 'Lists' table (probably an extra space at the end or something)
I Just created a new table to check it out using DISTINCT and you get this:
Proud to be a Super User!
Paul on Linkedin.
hi @powerbi-learner we have created a solution to this using dax .
Please check our latest blog on this :
https://www.beinex.com/blog/dynamic-highlight-bar-chart-with-slicer/
See if this thread helps:
Change the colour of a bar based on a filter
Proud to be a Super User!
Paul on Linkedin.
@paulmorgan , This seems correct to me
Try this. Just sure country names are matching
colorFocus = IF( MAX ( Lists[Country] ) in allselected(tableCountry[Country] ),"Red","Grey")
I am assuming List is name of column, that is used on x-axis
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Thanks very much for your suggestion. Unfortunately, it didn't work for me. I created a sample file, but I guess I don't "rank" being able to upload pbix files, and my company doesn't allow for people outside the company to access OneDrive files, and I don't have a Dropbox account. I tried uploading to Google Drive, but it gives me basically a "file structure" when I click on it instead of an actual pbix file.
If you have any other suggestions on how to share the file, let me know. Regardless, I do appreciate your willingness to help out!
Google Drive is fine (even though you "see" a file structure, if you download you get the PBIX file). Alternatively, try a file transfer service such as:
Btw, did you check out the suggested thread ?
Proud to be a Super User!
Paul on Linkedin.
Hi Paul. Thanks for the advice. Here is the link to the Google Drive file. Hopefully, that works.
Yes, I was starting to work through the thread. it looks like it could be good. It's just more involved, and i was hoping to get away with being lazy. 😉 But I'm grabbing some coffee and working through it.
Thanks for your efforts!
Paul
Just checked out your sample file. The problem is that the country names in the 'tableCountry' table don't match the country names in the 'Lists' table (probably an extra space at the end or something)
I Just created a new table to check it out using DISTINCT and you get this:
Proud to be a Super User!
Paul on Linkedin.
For some reason I needed to delete the slicer and create a new one. Then things started working as you outlined. Thanks very much for your help.
This is really embarrassing. haha. I double-checked the names, and they match exactly. But I tried the approach anyway, and I still can't get it to work. Would you maybe share the file you created? I must still be doing something just silly wrong. Thanks for you persistence!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
144 | |
75 | |
63 | |
51 | |
48 |
User | Count |
---|---|
211 | |
86 | |
64 | |
59 | |
56 |