Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

patriciousa
Contributor

Fiscal year - Order Months in line chart

Can anyone help me with this same problem?

This is my calendar:

Calendar:

DECLARE FIELD DEFINITION TAGGED '$date'

Parameters

first_month_of_year = 1

Fields

Year($1) As Year Tagged '$year',

Month($1) as Month Tagged '$month',

Num(Month($1)) as MonthNum Tagged '$month',

Date($1) as Date Tagged ('$date', '$day'),

Week($1) as Week Tagged '$week',

Weekday($1) as Weekday Tagged '$weekday',

DayNumberOfYear($1, first_month_of_year) as DayNumberOfYear Tagged ('$numeric');

DERIVE FIELDS FROM FIELDS "Fecha Registro" USING Calendar;

I don't understand how and where to put the script to make my bar charts show data in the following order:

July, August , September, October , November, December , January, February , March, April , May, June


Thank you.

Regards.

1 Solution

Accepted Solutions
patriciousa
Contributor

Re: Fiscal year - Order Months in line chart

I don't know if that works but I solved it by adding a simple table and using "NumeroMes" in sorting by expression.

 

MesNumeroMes
Julio1
Agosto2
Septiembre3
Octubre4
Noviembre5
Diciembre6
Enero7
Febrero8
Marzo9
Abril10
Mayo11
Junio12

Thank you Sunny.

Regards.

5 Replies

Re: Fiscal year - Order Months in line chart

Have you tried sorting your data using this expression?

=Match(MonthNum, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6)

patriciousa
Contributor

Re: Fiscal year - Order Months in line chart

I don't know if that works but I solved it by adding a simple table and using "NumeroMes" in sorting by expression.

 

MesNumeroMes
Julio1
Agosto2
Septiembre3
Octubre4
Noviembre5
Diciembre6
Enero7
Febrero8
Marzo9
Abril10
Mayo11
Junio12

Thank you Sunny.

Regards.

MVP
MVP

Re: Fiscal year - Order Months in line chart

Sunny offered a clever trick, but it would have to be repeated in all charts involving months. If you'd like ALL of your charts to be presented by Fiscal Month, I'd change your calendar declaration using the setting first_month-of_year:

first_month_of_year = 7

This way, your calendar should get generated with the desired order of fiscal periods.

cheers,

Oleg Troyansky

Upgrade your Qlik skills at the Masters Summit for Qlik - coming soon to Milan, Italy!

Re: Fiscal year - Order Months in line chart

Yup, I am glad you were able to figure it out

patriciousa
Contributor

Re: Fiscal year - Order Months in line chart

Hi Oleg.

I tried that but didn't work.

Thank you.

Regards.

Community Browser