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

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

Related

Display legend for Tableau Chart

In Tableau I created an Area chart. I have managed to display legend for the measure values but cannot legend one for the grey line (additional measure in Rows) as I have built a dual axis chart.
Could some one guide me how this could be done. Apologies if the question is unclear. Can provide more details if need be.
If you're on a worksheet then
Select Analysis > Legends > Color Legend.
Select Worksheet > Show Cards > Reset Cards.
Right-click in the space below the Marks card and select Legends >
Color Legend.
If you have dual axis, ensure transparency is 100% on the first pill else the colors in legend will not show up.
EDIT:
In case you have already done that, try using the All marks card (the top one), put Measure Names on the color shelf

tableau - color text dimension according to other dimension value

I have 2 dimensions (one is BUG_ID, the other is severity).
I have defined a specific color for each possible severity (blocker == red, normal= orange...)
I am using a table and I want to color the BUG_ID dimension value (the text) according to the color defined for reach severity for example:
I have tried several things but cannot figure out how to do it.
Any idea ?
Generally Tableau is a data visualisation tool, so if you want to create graphs of any kind it's great. If you want to create a table and format text, stick to Excel!
You can drag all dimensions you would like to have in the rows shelf. eg: [Description] and [Status]. Now you can drag the [BUG_ID] onto "Text" in the Marks pane. That will display the bug ID, but it will be on the right of all other dimensions. And you won't be able to change it.
To color it, just drag [Severity] onto colur and choose the colors you want.

Tableau show legends for lines charts on dual axis?

I have 2 lines in a chart and i used dual axis on them. For each line, i manually picked colors for them through the MARKS card.
Now I need a legend to show what each line and their color represent but i dont see any way to do it. When i put one of the pill on the colors box, it gives me a gradient of colors on my trend line which is not the color i manually picked by clicking on the colors box.
How can i go about doing this?
Using the "All" marks card (the top one), put Measure Names on the color shelf

How do you heatmap in tavleau a list of numbers based on another column data

I have data from 48 countries. I am trying to visualize it on a map. I want to display half the countries in 1 color and the other half in another color. This segmentation is based on another column which has string value 'yes' or 'no'. I want to do it on tableau
Country data OFF
------------------------
US 100,000 yes
IN 200,000 yes
BR 300,000 no
MX 150,000 no
I want to plot US, IN in Blue and BR, MX in green. The shades of green and blue are dependent on the values of data.
Have you tried to drag the OFF field to Color in the sheet? This should do the trick
You can put either the measure data on the color shelf to color by value, or the dimension OFF on the color shelf to color by OFF -- i.e. to use color to encode a single field's value.
If you want to color by two dimension fields, you can get the shading effect you mention by putting both on the color shelf -- using the shift key to add the second one if it's not in a hierarchy with the first one.
If you want to color by both a dimension and a measure (as in your case), you have to go to a little more effort -- assuming its worth it. You can make a calculated field that uses both fields to map into a category (say returning a string like "off yes, data high" or "off yes, data mid") and then edit the colors to map them as you like.

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.