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: 
Not applicable

Line charts resorting months on click

On a line chart I have, months (Apr, May, Jun, ...etc) is resorting when a month is clicked on (ex. Jan, Feb, Mar,.....Dec, Apr). I need the date to remain (Apr, May, Jun, .... etc).

1 Solution

Accepted Solutions
jerem1234
Specialist II
Specialist II

Try enclosing the expression you are sorting with by only and with ignoring selections like:

only({1}bPeriod)

Hope this helps!

View solution in original post

8 Replies
manojkvrajan
Luminary
Luminary

Paul - Clear all check boxes and Check ONLY Text A -> Z as mentioned below and see if that works.

Sort BY Text AtoZ_and_UncheckAllOptions.PNG.png

MarcoWedel

Hi Paul,

do not use "text" but "numeric" sorting if the months result from timestamps or dates and thus are numeric.

regards

Marco

Not applicable
Author

In mine I have expression as Ascending with bPeriod in the box under the expression and Numeric value as Ascending. As in my note, bPeriod = (Apr,may, Jun, Jul, Aug, ....).  This seems to make a difference.

Not applicable
Author

load an inline table before your loading your calendar table as below

(give month names in the order you wanted.

load Monthinline

[

Month

Apr

May

Jun

................

];

you can delete this table once your calendar is loaded.

now in your chart use 'Load order = Original ' as your sorting

MarcoWedel

you are saying the sort order you expect is and remains "Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, Jan, Feb, Mar" and is defined by your expression bPeriod?

Then if bPeriod changes, the sorting order of the Month dimension also changes.

You could check the sort-by-expression check box and use a static expression like

if(Month > 3, Month-3, Month+9)

instead (also unchecking every other check box and provided your Month field is indeed numeric)

This way you would stick to the order "Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec, Jan, Feb, Mar" regardless of any selections.

regards

Marco

jerem1234
Specialist II
Specialist II

Try enclosing the expression you are sorting with by only and with ignoring selections like:

only({1}bPeriod)

Hope this helps!

Not applicable
Author

This worked.

Thank you.

Not applicable
Author

only({1}bPeriod) did work.