Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
patriciousa
Creator II
Creator II

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
Creator II
Creator II
Author

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.

View solution in original post

5 Replies
sunny_talwar

Have you tried sorting your data using this expression?

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

patriciousa
Creator II
Creator II
Author

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.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

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!

sunny_talwar

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

patriciousa
Creator II
Creator II
Author

Hi Oleg.

I tried that but didn't work.

Thank you.

Regards.