Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sorting error

Hello Qlik Community,

I'm having some trouble figuring out this problem:

In 2 of my visualizations I use the same dimension and sorting parameters, yet the sorting is different.

In attachment "qlik.png" you can see that the month November is slipping in between the others as "2017-Nov".

In attachment "qlik3.png" you can see the other visualization, where the sorting is correct.

Granted, the sorting is set to "auto" at the moment, yet the other options didn't make a lot of sense either.

The used dimension is described as follows:

    

     =Year(floor([transactions.date])) & '-' & Month(floor([transactions.date]))

I have considered using the wildmatch function as a sorting expression, but that won't let my sort by year first.

Can anyone help me sort this out?

1 Solution

Accepted Solutions
sunny_talwar

Don't know really know why, but this works

=MonthStart(Min({1}[transactions.date]))

Capture.PNG

View solution in original post

11 Replies
sunny_talwar

Use this as your dimension

Date(MonthStart([transaction.date]), 'YYYY-MMM')

and then sort numerically

Anonymous
Not applicable
Author

Hi Sunny,

nice to meet you here again.

I tried your solution, and it works in principle, but the formatting of the labels is off.

As you can see in the attachment it still uses the date produced by the MonthStart function.

Any hints?

PS: This is how my dimension looks like: "=Date(MonthStart([transactions.date]), 'YYYY-MMM')"

Edit: Seemingly also because of this change, there appears a useless scrollbar beneath the visualization. It does not disappear if I increase horizontal or vertical size of the visualization.

sunny_talwar

I guess continue using this as your dimension

=Year(floor([transactions.date])) & '-' & Month(floor([transactions.date]))

but sort using this expression

(MonthStart([transaction.date])

Anonymous
Not applicable
Author

I tried that, but the original error reoccurred.

sunny_talwar

original error?

Anonymous
Not applicable
Author

Well, the November entry is back between the others again, as described in the question description.

sunny_talwar

Would you be able to share a sample where we can see the issue?

sunny_talwar

Mocked up data will work as well... all that matters is that you can recreate the issue in a sample file

Anonymous
Not applicable
Author

Well this took some time.

Tried to keep it as close to the actual data as possible without revealing anything important.