Displaying Percentage Bar in APEX Reports

Displaying Percentage Bar in APEX Reports

APEX can create "Percentage Bars" within a report. They're probably a lot of 3rd party tools you can use for fancy percentage bars, however if you want a basic display to the user here's a quick way to do it. Click here for a demo.

1- Create your report In this report we're using the employees percentage of salary within their department

SELECT e.ename,
       e.job,
       d.dname,
       e.sal,
       ROUND (e.sal / SUM (e.sal) OVER (PARTITION BY e.deptno) * 100, 0) pct_dep_sal,
       ROUND (e.sal / SUM (e.sal) OVER (PARTITION BY e.deptno) * 100, 0) bar
  FROM emp e,
       dept d
 WHERE e.deptno = d.deptno

2- Add Percentage Bar for the "bar" column

  • In the Reports Attributes section, click on the "Bar" column attributes
  • Under Number/Date formatting enter the following: PCT_GRAPH:330099:CC0000:100

PCT_GRAPH:<Hex background color>:<Hex foreground color>:<Bar width in pixels>