Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to set conditional marker colors in line charts? #94

Open
Yang-Shang opened this issue May 13, 2024 · 1 comment
Open

How to set conditional marker colors in line charts? #94

Yang-Shang opened this issue May 13, 2024 · 1 comment

Comments

@Yang-Shang
Copy link

I'm learning the Power BI sample report - Regional Sales Sample. In the Win/Loss Ratio Overview page, there is a line chart "Closing Percentage by Month". In this line chart, the markers have different colors based on the Close%. When clicking somewhere else to narrow the dataset, the marker's color also changes accordingly.
Can you give me some guidance on how to set conditional marker colors? Thank you!
line_chart_with_conditional_marker_color

@mattantaliss
Copy link

It's poor implementation from Microsoft, but the trick here is to first change that visual to a 'Clustered column chart'. Then, you can set the 'Color' of the 'Columns' (in the Visual settings) via the 'fx' icon. In there, you can specify a gradient, color by rules, or color by a field value. Once you have your colors set as desired, change the visual back to a 'Line chart'.

Here's an old (~5 years ago) YouTube video that shows off the idea: https://www.youtube.com/watch?v=A4iG8S4EpHs

Why it requires that clunky work-around (and why that work-around should even work in the first place) and is not a thing that is possible directly through the 'Line chart' settings is one of many Microsoft/Power BI decisions that is beyond me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants