Color a row based on column value in Interactive report in Oracle Apex 4 - oracle-apex

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.

Related

How to conditionally format text in PowerBi

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

Only displaying "tallest" bars in bar chart

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:

Oracle APEX - customizing bar chart

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'

Add Hyperlink below the Card or table visual Conditionally in power bi

I have a Power-Bi Report where I need to show the hyperlink in the card or table conditionally. the report is having Account_id as slicer value.
If an account_id results more than 4 records in the visual, I need to add a extra row with text "More.." in it. Reference image is below.
Thanks in advance
I don't if it's possible to get exactly what you want, but here's my attempt. Power BI still isn't great if you need a lot of control over formatting.
First, create a ranking column:
Rank = RANKX(
FILTER(ALL(Table1),
Table1[account_id] = EARLIER(Table1[account_id])),
Table1[Partners], , ASC)
Next, a column that displays the top ones and "More..." for any possible 5th items.
Display = IF(Table1[Rank] > 5,
BLANK(),
IF(Table1[Rank] < 5,
Table1[Partners],
"More..."))
Finally, a column that contains the desired URL for the "More..." rows:
Link = IF(Table1[Display] = "More...", "http://www.URL.com", BLANK())
Here's what my sample data table looks like:
Then you can set up a table with the Display and Link column. Make sure to choose "Don't summarize" for the field and choose URL icon on under values formatting options to get the link icon instead of a URL. You'll probably also want to filter out blanks in your visual fitter settings.
For the right-hand table above I changed the column header texts to "Partners" and " " in the table Values box.

Expression to set cell spacing with SQL Report Builder 3.0

I want an expression tho show the square box around every entry inside a column.
I am getting a normal table view right now. I just want to seperate each row borders.
.i.e. Cell spacing.
Please help me in using cell spacing with report builder 3.0
In addition to resolve this issue do the following steps:
Add one more row above & below to the Data Row & adjust the height for row as 0.2 in(Approximately - Can you add it more as your wishlist).
Then set the background Color using the expression where you want to display a square box as follows,
If you want to match any conditions,
=Switch(Condition = Value_1, "Red",Condition = Value_2, "#D2D2D2",True, "No Color")
otherwise specify color names or code, red, etc.