Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Classic Report -> Column Type: Percent Graph

mtAug 6 2022

I have a view pulling a week's sales for each year (ie, Week #53, for each year). then I used lag to find out the sales for the same week of the prior year, and the increase/decrease. That all works fine.
I thought I'd add the change using the Percent Graph column type, but, apparently that only works if the change is greater than 0....
Is there a work-around I'm not thinking of? I was hoping to have the bar graph show up or down (perhaps using green and red) off of a center bar.... or something like that
thank you
mt in NY

with thisweek as (
    SELECT
sales,
EXTRACT(YEAR FROM WE) AS year
from
week_sales_mv 
)

select 
year,
sales,

sales - lag(sales) over( order by year) as change,
(sales - lag(sales) over( order by year) )/sales * 100  as change_PCNT,
(sales - lag(sales) over( order by year) )/sales * 100  as change_graph
from
thisweek
Comments
Post Details
Added on Aug 6 2022
0 comments
624 views