Is it possible to make a bar chart a double y-axis?
I have a bar chart with 4 bars, generated by the query, returning 4 rows.
Is there a way for me to make each bar a different color and on the right-hand side, instead of series name, specify colors along with labels for each bar?
Click on one of the chart series and look for the 'Assign to Y-Axis' attribute
Not how this is next to a 'Color' attribute. You can source this colour from your SQL, substituting your value using the using &COLUMN_ALIAS. syntax.
An example from the sample charts application in the linked form post shows how colour can be row based (with column alias adjusted to match my screenshot)
select a.product_name,
b.quantity,
b.customer,
-- This is the column you're looking for
case when b.quantity > 50 then 'gold'
when b.quantity <= 30 then 'red'
when b.quantity > 30 then 'green'
else 'blue'
end as colour
from eba_demo_chart_products a, eba_demo_chart_orders b
where a.product_id = b.product_id
and customer = 'Store A'
Related
How can I set a bar chart to only show legend items that have results when I run a filter?
e.g. I filter search someone's name who has data points for 5/15 categories. I would like my bar chart to only show the legend of those 5 categories and exclude the other 10. Say I then filter search a different person's name who has data points for a different 5 categories it will only show visualise those results and exclude the other data?
TIA!
Is there a way to conditionally format my table so I can add a bar like below? (it was created in excel)
Image I want to create:
I am currently stuck with the following - I highlighted the dates but need to know how I can highlight the holidays in my table with that grey color. (the picture below uses Thanksgiving as the example). My goal is to highlight each individual holiday in the table in grey.
Image I need to conditionally format
Here is what I tried with the formula provided below:
Attempt
You need a date dimension that has an attribute like isHoliday.
Create a measure where you specify the color in the Hex Code format ("#A1A1A1")
for instance:
measure_color_coding_holiday = SWITCH ( TRUE (), 'Date'[IsHoliday] = "yes", "#808080", 'Date'[IsHoliday] = "No", "#FFFFFF" )
Go to the conditional formatting for the column > Background Color. Choose Field value and pick the new measure.
/Tom
I am trying to create a clustered bar chart in PowerBI Desktop, where only the N "tallest" bars are displayed.
My dataset consists of a small number of rows but a large number of columns.
I have tried the following:
Transform the table in absolute values (since I am interested in bar height, not negative/postive strictly)
Try to apply the "top N" filter on the axis datafield
However, nothing happens. The chart currently looks like this (without applying the transformation of the absolute value): Clustered bar chart
I basically want the same chart, but only display the N tallest bars.
You might have to pivot your table, so you have a "column name" field and a "value" field.
Then you need to use the TOP N on the Legend field, like this:
Filters:
Result:
My goal is to create a stacked column chart which shows two distinct categories of data, each with its own color scheme (category 1 in blue, category 2 in yellow):
Is this possible using AMCharts version 4?
I've simplified the stacked column chart demo to create this JS Fiddle:
How can I apply separate colors to the 2016 and 2017 columns? I tried adding a range of colors to charts.colors.list:
chart.colors.list = [
am4core.color("#845EC2"),
am4core.color("#D65DB1"),
am4core.color("#FF6F91"),
am4core.color("#FF9671"),
am4core.color("#FFC75F"),
am4core.color("#F9F871")
];
... but both categories use the first 3 colors in the list. How can I force the second category to use the next color in the list, and not start over with the first color in the list?
I wanted to color the complete row based on a value of a column. My query looks like this:
select ID,
DB_NAME,
SERVER_NAME,
DB_STATUS,
SERVER_STATUS,
DB_SERVER_STATUS
from DB_SRVR_STAT_V;
If the DB_SERVER_STATUS = 'A' then I want the row to be colored
green or
if the DB_SERVER_STATUS = 'I' then I want the row to be
colored yellow or
if the DB_SERVER_STATUS = 'RO' then I want the
row to be colored red.
I have been looking to find a way to do this, but I haven't been able to get the result I want.
If your report is an Interactive report, you could highlight the rows on the report by going through Actions -> Format -> Highlight the rows by selecting the desired color and defining the condition for your column.