PowerBI Custom Legend and Column Colours in Stacked bar chart - sql

so I am trying to customise the colours for the legends. Basically what I am trying to do is to group the legends by colour. For example image we have refineries which are in different locations in the world. So for example if refineries 1, 2 & 3 are in Asia they should be coloured in green, and if refineries 4 & 5 are in Europe, then they should be coloured in blue. An example of this is shown below (created by excel):
Currently in PowerBI, this is my stacked chart:
So as you can see, the colours are dependent on the refineries, rather than on the locations (which are stored in a related Locations table).
Any idea of how this can be tackled in PowerBI please?
Much appreciated!

It would be very useful for BI developers if you could customize and format a little bit in Power BI using the built-in tools and expressions, something similar to SSRS, where you can set a color property based on the report data. Hope features like that be implemented soon.
As far as I know you can use Data Colors Pane:
Very manual and I think it breaks when new legends are added.

Related

Highlighting a part of a series in Candles chart

In my project, I use Apexcharts to display a candle bars chart. Actually, many of them. But I need to be able to highlight a certain part of the candle series on the chart. I couldn't find a way in the docs. Maybe there is, but not that straight, like maybe splitting the series in two and displaying them with different colors?
The latter, though, I've tried and it looks like it breaks the chart, because they dont not even look like a single series anymore, with weird offsets and missing candles.
Can someone at least give a hint how to achieve highlighting on a series?

How to make 3D pie chart in pentaho CDE?And where is the location of xml to edit its properties?

I want to make 3Dpie chart in Pentaho.
In several forums they said that what we want is to add is-3D parameter to XML. But I don't know where chartData.xml is.
No, it is not possible to make 3D pie chart. CCC (Community Chart Components charting library which is used by Pentaho CDE) does not support 3D chart effects.
Check an answer at the bottom of this Pentaho forum archive from the CCC developer.

Would it be possible to subclass a Chart in VBA?

Would it be possible to "subclass" a Chart in Excel to create a modified version of it?
My wish is for an Improved Bubble/XY Chart in Excel. With the native chart, I can create charts of varying X, Y and Bubble Size, such as:
In a recent project, I wanted to classify these bubbles into groups A and B based on some given criteria, and using different colors was the solution I found. I also wanted to label each bubble on a per-row basis. I had to use a simple VBA Macro to color the bubbles and add labels dynamically, but the end result was quite nice:
In the end, I was left wondering. My programming experience is mostly in Python, so naturally I though of subclassing the regular Chart to allow for a more user friendly experience, such as customizable colors, categories and being able to pick labels from a Range. Is that possible in VBA?
Most of the tips for VBA subclassing that I have found online refer to using the Windows API and subclassing UserForms, but that is not exactly what I want.

Qlikview Report Formatting

I am trying to create a Qlikview report with our company theme incorporated. How do I make it so the margins are not white, but the color I want? And I am also interested in having our logo spread across the top of each page -- the issue I am having now is I have included a picture as header but it only spreads across the middle 1/3 of the top, so it is small and there is a lot of white space.
I have created a Qlikview theme with the color scheme of our company included in it, but I haven't been successful in applying it.
Thanks.
You can use line objects and format the way you like .
Regards,
Nadeem

Excel: Adding a Connector Line In a Chart (Have to Use a Macro)?

So I'm working on this chart in Excel, and the chart looks like two sides of a triange, like the picture at the link below:
http://a.imageshack.us/img832/6207/triangle.png.
I'd like to make a line (like, with an autoshape for example) that connects the 2 endpoints to form a triange; ie a line going from coordinates (4,1) to (4,5). I tried doing this by creating a seperate data series in excel with the coordinates of the connecting line, like:
4,1
4,2
4,3
4,4
4,5
However, in excel, all lines in this chart must have the same x coordinates. Does anyone know how to get a connecting line automatically? Say, with a macro or something? Reason I ask is because I want to be able to change these coordinates, and I want the connecting line to adjust with very little effort (ideally I could write a macro and assign it to a button that when you click it would adjust the connecting line). I have some very limited macro experience, but this is just beyond me. The type of chart I'm using is a standard line chart, where the description given by excel is "Displays trends over time or categories". Anyone know of a good resource or have some advice? Thanks.
PS I solved this problem by changing the chart type to a scatter chart, but this messed up the axes and scale, and required that those be adjusted, so I think adding a line in this manner automatically will be easier.
The scatter chart worked OK.
Used formulas included in the following image.
Perhaps you should include an image showing the problems you found.