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

Sort Data in Bar Chart: years are next to each other for every month

Hi!

I was trying to create a bar chart that would show the comparison of rainfall (of all months) for every year. And I need that a specific month (for example: January) with different years sit next to each other as seen below. But that only applies when I clicked 1 month in the filter pane.

ren_01_0-1653112429518.png

If I clicked 2 months in the filter pane, the sorting would be (Jan 2018, Feb 2018, Jan 2019, Feb-2019) instead of Jan 2018, Jan 2019, Feb 2018, Feb 2019.

ren_01_1-1653112637181.png

Thank you!!

Labels (4)
2 Replies
vinieme12
Champion III
Champion III

Use two dimensions

1st) Year

2nd) Month

 

don't use YearMonth dimension

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
rubenmarin

Hi, in the chart properties-> sorting tab, you can add a sor by expression and use Min(MONTH), so it will be sorted first by month and then by date.

To do this MONTH has to be a numeric or Dual(), if doesn't works try adding a field with Moth in number on the calendar and use this field in the sorting.