Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello power people!
For example, I have vendors on a pie chart, each vendor segment in the pie chart has a different color, and I have a card visual to display the name of the vendor when I click on and highlight the vendor on the pie chart.
What i'm trying to do is, I want to change the color of the text on the card visual to change based on what color the vendor has on the pie chart. So if there is a vendor A which has a blue color on the pie chart, what I want to happen is when I click on this Vendor A, the text color of Card visual will turn blue.
Is this possible?
Thanks!
At this time, visuals only know about the report theme colour palette, and not about each other's colours, so even with custom visuals, you're not going to be able to understand the colour of a selection in another visual, just the filter context in the current page (if you have selected a specific data point).
I think that this is an ideal use case for expression-based formatting, which is planned to go into public preview in April (although the release notes are indicative). In this future-state, I imagine that this would work by setting up a measure to handle colour assignment and then this measure (or the DAX behind it) can be used anywhere that you need it (colour assignment in the pie chart; background assignment in the card).
Proud to be a Super User!
My course: Introduction to Developing Power BI Visuals
On how to ask a technical question, if you really want an answer (courtesy of SQLBI)
Not with the default card that comes with Power BI. Card with States by OKViz allows you to change the card color. You'd have to look at it to see if it fits your needs.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHello edhans,
I tried it and I don't think it helps with what I meant if i'm correct.
What i'm trying to achieve is to have the same colors that the power bi generates randomly each time we open the report to apply them on the text on the card visual. Is there some kind of DAX function that gets the colors the power bi assigns to values on the pie chart, bar charts and the other visuals?
For example, here is the pie chart I have, as you can see, these colors were assigned by power bi itself, what I want to do is if I clicked on and highlighted one of these colors, I want the text color on card visual to have the same color as the one I highlighted.
Is this possible?
Thanks for the help!
Not that I am aware of. You'd have to dig into the custom visuals in the Power BI visual store and see if anyone has written such a thing.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingCovering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
100 | |
86 | |
64 |