How to set dynamic conditional formatting on color of gauge chart? - charts

In my PowerBi report, I have added a guage chart, and applied conditional formatting, based upon 2 values:
Target
Actual Value
If the actual value is more than target, then the gauge chart will be green otherwise red. Now, based upon the data selected in a multi select drop down, the values of both 'Target' and 'Actual value' changes. Therefore, I want to have a dynamic conditional formatting for the guage chart where the conditional formatting for color is applied correctly according to different targets and their respective actual values.
For example:
Target; Actual Value; Color of Chart
85; 84; Red;
77; 79; Green;
65; 71; Green;
However, as displayed in the attached screenshot, the highlighted box expects a hardcoded numeric value. Please advise how to achieve this. Thanks in advance.

Related

How to put color for the whole cell

I am trying to color code my list in tableau with red color for dates in end date lesser than today() or when concern column is Yes. I created a dual axis of 1 and 0 to get the cells with color in one column and get the text in another and created a dual axis so that they overlap. For that I created a calculated column where I gave the color red if the conditions meet.
This is in my calculated field:
Color:
IF TODAY()>[End Date] OR [Concern (Yes/No)]="Yes" then "RED"
ELSE "None"
END
However even after totally maximizing the size of the square for color for 1. The fields do not fill the whole cell. How do I fill the whole cell?
Here is the pic:
Please help me out here?
You may have 2 options here. I haven't tested so will leave you to see what works best.
Option 1 - use a measure and a Square mark type. Create a calculated field that returns a measure. We can adapt the formula you have built:
INT(TODAY()>[End Date] OR [Concern (Yes/No)]="Yes")
Put that field on Columns - aggregate to either MIN or MAX, doesn't matter - and set the Mark Type as Square. Also put this field on Colour and set your colours accordingly. Put your text on the Label shelf (or Text, I forget what it's called with the Square mark type.
Option 2 - similar to what you have now. You don't need MIN(1) and MIN(0), just one of those should suffice. Make it Gantt, the above calculated field on colours and your text field on Label. This article on the Tableau placeholder technique describes how to do this.

How to add legend for color saturation distribution into power bi Filled Map chart

i have a power bi report "Filled Map" chart, where Location = "Cedent Country", and Color Saturation = "Percentage Brokerage Over Premium".
Percentage Brokerage Over Premium = Percentage Brokerage Over Premium = IFERROR(Round(SUM('Production ReportV20-V1 Power B'[Total Brokerage])/SUM('Production ReportV20-V1 Power B'[Cedent Premium]),2),0)
In Format --> Data Colors i configured color saturation as below:
Minimum: Red
Center: Orange
Maximum: Green
I need to show in the chart Legend to display color distribution (Minimum: red, Center: Orange, Maximum: Green), but i couldn't find the option any where.
I created another field Description = IF([Percentage Brokerage Over Premium]<0.1,"Low",IF([Percentage Brokerage Over Premium]>0.25,"High","Medium")) and tried to drag it into Legend field section however nothing happened.
appreciate your assistance.
Best regards,
The Legend field only accepts a column, not measures as input. Therefore nothing will happen if you drag the measure to the field.
The reason why it only accepts a column is because it doesn't serve the purpose as what you mean for legend (i.e. concise explanation of the symbols used in a chart, diagram, drawing, map, table, etc.) [1]
Rather, it's for further slicing/breakdown of the data that you are interested in (e.g. Premium type/LOB, etc).
So my suggestion is that you can simply add a text box to type the legend (i.e. High: red, Medium: orange, Low: green); or better you can add an image with the diverging color and description to the report, like below.
Select chart and Visualizations -> select format tab
1) Select Data Colors
2) select conditional formatting on Default color near right side icon
3) Select Minimum and Maximum color

Change pie chart color in Kibana

One of my uses of Kibana is related to displaying some information in certain cases only (say when a value is unexpected and exceeds a defined range). This element is therefore either shown or hidden from the dashboard, and displaying it could be considered as displaying an alert. I would prefer if the related pie chart was filled in red, rather than the default green.
Any ideas on how to do this?
Assuming you are describing Kibana 3, if you want terms panels pie charts to use different colors, you will need to make a code change.
There is a way to have custom colors for your pie chart. In order to do that you'll need to create a "hits" panel and pick the "pie chart" as the display. The color of the pie slices will be determined by the color that you chose for the queries that they track:

Custom Colors in Pie Charts (Crystal Reports 2008)

I am using Crystal Reports 2008 (12.4.0.966), and can't seem to force specific colors in a pie chart.
We are analyzing selected measurement topic (MT) scores of elementary and middle school students. The report has five groups, and the chart is going into the Group 3C Footer (where a parameter can cause it to be suppressed if desired). I have a database column Score that can have values from 0.000 to 4.000. To enjoy some sanity for the resulting charts I impose granularity with the #LetterGrade formula:
SELECT {Reporting_CFSD_MT_Scores_A;1.Score}
CASE IS >= 3.5 : "ADV" // Advanced
CASE IS >= 3.1 : "PRO+" // Proficient Plus
CASE IS >= 3.0 : "PRO" // Proficient
CASE IS >= 2.5 : "APP" // Approaching Proficiency
CASE IS >= 2.0 : "BASI" // Basic
DEFAULT : "BLB" // Below Basic
In the Chart Expert >> Data tab, I've got On Change Of #LetterGrade with specified order based on the order in the formula above, and my Show Value is Count of #LetterGrade. The resulting pie chart gives me the break down of grades that I need.
The problem is that I want each of the six pie slices to have a specific color -- from bottom to top: Red, Orange, Yellow, Green, Blue, (Dark) Violet -- rather than accept the default colors. I thought I could go to the Color Highlight tab in the Chart Expert and have six entries (e.g., #LetterGrade = "ADV" sets a custom color of dark violet (and I've tried it with and without the quotes around the string)), but the first pie slice is always blue, the second is always tan, the third is always green, etc., regardless of what value it represents.
Am I misunderstanding the purpose of the Color Highlight tab? Is it not possible to set custom pie slice colors in this version of Crystal Reports (after more hoops than I care to think about I'm finally downloading SP5, but at the rate its coming in I may not have it fully downloaded until tomorrow; God help me if the solution is in one of the six 5.X or 6.X Fix Packs)? Or am I just missing a trick somewhere?
EDIT:
For giggles I changed the sort order on the Data tab from a specified order to ascending order and now the pie slices are exactly the colors I wanted. So it appears that I can either specify the display order of the slices and have to accept the default colors, or I can let it display in an undesirable order and get the colors I want. Sounds like a bug to me, unless someone knows a trick for getting around this.
If I'm not mistaken, in the report editor, preview the report and then click on a pie slice so it is selected. Then right click on that slice and select "Format Pie Sclice". Then you can change the color, pattern, gradient, etc.
Let me know if that works.
Chris
EDIT: If you want to do it conditionally, I think you may need to specify
#LetterGrade => 2.0
which in the editor should be #LetterGrade is greater or equal to 2.0
instead of
#LetterGrade = "BASI"
But you should be getting a choice of values when you create your conditions. I did a quick sample report with a chart that shows me the onhand value of certain items and I was able to "hardcode" the colors using the steps outlined in my original answer and also conditionally by using the Color Highlight wizard and the predefined values.
It turns out that editing the chart in design view doesn't work correctly. In the design view, when I use the Chart Expert I can either specify the order in which the slices are displayed, or I can designate the color for individual slices, but I cannot do both (also, in the Highlight Color tab, the last box in the Item Editor section -- where you choose the value to match -- does not give me a drop-down menu from which to choose, but instead will only let me type in the value to match: thank you #campagnolo_1 for bringing this lack to my attention, which pointed me toward the solution).
If I instead work in the preview view, click on the chart, and pull up the Chart Expert there (and choose Applied to group template), I can both set the sort order and the highlight color.
I'm guessing this is a bug, but since CR2008 isn't supported any more, I'll just have to live with it.

How to set series expression when you do not have any series when creating bar chart in iReport?

I have created a bar chart in iReport Designer 5.1.0. I want to show some ips at x axis and the occurrence of each of these ips at y axis. The bar chart must have a single color but when I run it bars have different colors with each other. I think series expression has to be empty, and I have to put $F{ip} in category expression and $F{occurrence} in value expression, but series expression has to be filled because it is not optional.
It would be great if someone can help me.
In your series expression, using quotes you can just specify something like a name or anything relative to the chart. For e.g,"Ip v/s Occurrence". Basically have a string value in there. This will be displayed as a legend. You would get the chart in single color.
change the orientation again back to vertical. Click the barchart and choose the properties to be orientation:vertical.
Hope thats what you meant