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!

Set sort order by month on a line with area chart

Javier PApr 30 2021 — edited Apr 30 2021

Hi All,
In Apex 20.2
I have a Line Chart with one series.
This is the series code:
select null,
sum(p.prima) value,
TO_CHAR(f.expiracion,'MM') Month,
DECODE(TO_CHAR(f.expiracion,'MM'),'01','Ene','02','Feb','03','Mar','04','Abr','05','May','06','Jun','07','Jul','08','Ago','09','Sep','10','Oct','11','Nov','12','Dic') as Label
from risk_facturas f, risk_polizas p
where p.poliza_id = f.poliza_id
and f.expiracion between trunc(sysdate,'YEAR') and add_months(trunc(sysdate, 'y'), 12) - 1
and f.tipo_factura in ('Póliza Nueva','Renovación')
and nvl(p.norenovar,'N') <> 'Y'
and f.organizacion_id = :APP_GET_ORGANIZACION_ID
group by TO_CHAR(f.expiracion,'MM')
order by TO_CHAR(f.expiracion,'MM')

The problem is that I would like to set the sort order to the month column and not the label ascending or descending two option of the sort order attribute of the chart.
In other words, I need to sort it with the month column but show the label column.
Is there a way to indicate the sort order to other column and not the label column ?
Do I need to change the query in order to be able to use month column as the order?

Thanks for the help!

This post has been answered by Rick-Pick on Apr 30 2021
Jump to Answer
Comments
Post Details
Added on Apr 30 2021
5 comments
2,140 views