Query :
select rn
, tenantname
, budgetname
, amount_usd
, actualspend_usd
, pct
, '<div class="a-Report-percentChart"><div role="meter" aria-valuenow="'||pct100||'" class="a-Report-percentChart-fill" aria-label="Percent Graph" style="width:'||pct100||'%;background-color:'||bkcolor||';"><span class="a-Report-percentChart-value">'||pct||'%</span></div></div>' pct_style
from (
select row_number() over (order by tenantname, amount_usd desc) rn
, tenantname
, decode(tenancyid, targetcompartmentid, '<span class="u-bold u-color-18">'||budgetname||'</span>'
, '<span>'||budgetname||'</span>') budgetname
, round(amount_usd) amount_usd
, nvl(round(actualspend_usd),0) actualspend_usd
, round(nvl(actualspend_usd,0)/amount_usd*100) pct
, case when round(nvl(actualspend_usd,0)/amount_usd*100) >= 100 then 100
else round(nvl(actualspend_usd,0)/amount_usd*100)
end pct100
, case when round(nvl(actualspend_usd,0)/amount_usd*100) >= 100 then '#CB4E3E'
when round(nvl(actualspend_usd,0)/amount_usd*100) < 61 then '#4B835E'
else '#897342'
end bkcolor
from OCI_BUDGETS()
)
Column - Identification - Type :
HTML Expression
Column - Settings - HTML Expression :
&PCT_STYLE.
댓글 없음:
댓글 쓰기