Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Support Case Portal has moved to Qlik Community! Read the FAQs to start exploring Support resources.
cancel
Showing results for 
Search instead for 
Did you mean: 
ruben_moya
Creator
Creator

Sorting chart by month name but chronologically

Dear Experts,

I've got the following chart, where we compare sales of the current year with the sales of the previous year. If I select the whole year:

ruben_moya_0-1620814185722.png

In that chart, we use just the month of the date because otherwise the sales for each month wouldn't be shown next to each other:

ruben_moya_1-1620814380814.png

My problem is that when we select a period of time that include months from different years (ie: September 2020 to February 2021) the dates doesn't apparead sorted chronologically:

ruben_moya_2-1620814709630.png

Result: Jan-Feb-Sep-Oct-Nov-Dec

Goal: Sep-Oct-Nov-Dec-Jan-Feb

I've tried to sort the chart using the date field by expression, but doesn't work. The only way to sort it chronologically seems to be by using a data format that also contain the year on it.

Dimensions:

Billing_Date

Billing_Year

Billing_Month

Measures: 

Sum(total_sales)

Sum({<Billing_Year=,Billing_Date= {'>=01/09/2019<=28/02/2020'}>}total_sales )

Does anyone know if there is any way to sort a chart chronologically but using as a dimension just the names of the month (so I can join the data from this year and the previous one)

 

Thanks in advanced!

 

 

 

1 Solution

Accepted Solutions
ruben_moya
Creator
Creator
Author

For some reason when I sorted by expression and used Date or Month-Year, it wouldn't work.

It just worked using de field Year Date:

 

ruben_moya_0-1620888707071.png

 

View solution in original post

1 Reply
ruben_moya
Creator
Creator
Author

For some reason when I sorted by expression and used Date or Month-Year, it wouldn't work.

It just worked using de field Year Date:

 

ruben_moya_0-1620888707071.png

 

View solution in original post