The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I want to create an area chart that changes to red(area and line color) when a measure is negative and be green when positive like this:
Is there a way to do this in powerbi or a custom visual i cannot find anything.
Thanks!
Solved! Go to Solution.
Not the full solution, but half a solution:
Conditional formatting is available for bar charts, but I can't see it for line or area charts.
You can start with a column chart and set the conditional formatting under Visual > Columns > Color as follows, using a field with the color hex in your table (click on the FX button and select field value and then the hex color from your table).
This will give you a bar graph with conditional coloring as follows:
If you then change the graph to Line, it retains the colors as the markers, but not for the line.
There doesn't appear to be a marker setting, but it does seem to work.
Not the full solution, but half a solution:
Conditional formatting is available for bar charts, but I can't see it for line or area charts.
You can start with a column chart and set the conditional formatting under Visual > Columns > Color as follows, using a field with the color hex in your table (click on the FX button and select field value and then the hex color from your table).
This will give you a bar graph with conditional coloring as follows:
If you then change the graph to Line, it retains the colors as the markers, but not for the line.
There doesn't appear to be a marker setting, but it does seem to work.
yes, this can be implemented. Is the static horizontal line not enough?
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
11 | |
7 |