Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to sort a graphic by month but starts with July ?

Hi everyone ,

I need to sort a graphic by month but I want July as the first month.

I saw this topic : https://community.qlikview.com/thread/159690

But the answer doesn't work.

I try :

- add SET FirstMonthOfYear = 7; even if I don't have it in my initial script

- modify the line about monthnames by SET MonthNames='juil.;août;sept.;oct.;nov.;déc.;janv.;févr.;mars;avr.;mai;juin'; instead of SET MonthNames='janv.;févr.;mars;avr.;mai;juin;juil.;août;sept.;oct.;nov.;déc.';

- in my graphic, I have a calculated dimension (month(date)) and in the properties of my graphic, in "sort" for this dimension I check "sort by Expression" with the following expression :

=if(month(Booking_Conf_item.date_debut)='01.juil.',1,

    if(month(Booking_Conf_item.date_debut)='02.août',2,

    if(month(Booking_Conf_item.date_debut)='03.sept.',3,

    if(month(Booking_Conf_item.date_debut)='04.oct.',4,

    if(month(Booking_Conf_item.date_debut)='05.nov.',5,

    if(month(Booking_Conf_item.date_debut)='06.déc.',6,

    if(month(Booking_Conf_item.date_debut)='07.janv.',7,

    if(month(Booking_Conf_item.date_debut)='08.févr.',8,

    if(month(Booking_Conf_item.date_debut)='09.mars',9,

    if(month(Booking_Conf_item.date_debut)='10.avr.',10,

    if(month(Booking_Conf_item.date_debut)='11.mai',11,

    if(month(Booking_Conf_item.date_debut)='12.juin',12,

    1))))))))))))

The result is : juil. then août. then févr. ...

So it doesn't work neither.

An extract of the script is :

SET ThousandSep=' ';

SET DecimalSep='.';

SET MoneyThousandSep=' ';

SET MoneyDecimalSep=',';

SET MoneyFormat='# ##0,00 €;-# ##0,00 €';

SET TimeFormat='hh:mm:ss';

SET DateFormat='MM/DD/YY';

SET TimestampFormat='MM/DD/YY hh:mm:ss[.fff]';

SET MonthNames='janv.;févr.;mars;avr.;mai;juin;juil.;août;sept.;oct.;nov.;déc.';

Does anyone have an idea ?

Kind regards ,

Gwendaline

2 Replies
MK_QSL
MVP
MVP

Use this

Fiscal Year

Frank_Hartmann
Master II
Master II

see attached file.

i think mod function is what you are looking for.

hope this helps