Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I have an issue concerning the sorting of stacked bar charts. I am aware of the limitations of stacked charts in Qlik Sense compared with Qlik View of only being able to stack one dimension, so I was wondering if there is a way to force it manually ?
In my example, I want to display the number of calls and visits (stacked) for Jan 2020, and right next to it have the number of calls and visits stacked for Jan 2021, and the same with the other months. Right now, Qlik Sense automatically orders them by chronological order (Jan 2020 - Feb 2020 - March 2020 [...] - Jan 2021 - Feb 2021) :
Is there any logical way to have the 2021-Jan Bar next to the 2020-Jan Bar, etc ?
I have already tried using the "Sorting by expression" with the following manual expression:
Pick(Match([Year-Month],'2020-Jan','2021-Jan','2020-Feb','2021-Feb','2020-Mar','2021-Mar','2020-Apr','2021-Apr','2020-May','2021-May','2020-Jun','2021-Jun','2020-Jul','2021-Jul','2020-Aug','2021-Aug','2020-Sep','2021-Sep','2020-Oct','2021-Oct','2020-Nov','2021-Nov','2020-Dec','2021-Dec')
,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24)
but this requires to add 2020 to the "year" filter used by the users, which is something I cannot change.
Does anyone have any ideas on this, or has faced this issue before ?
Thanks in advance for your help !
Hi @JosephJoestar !
Take your first sort field and change to sort by expression. In the expression use Month(Date_Dimension)
The result:
Se also the attachment app.
I hope to help!
Hi @JosephJoestar !
Take your first sort field and change to sort by expression. In the expression use Month(Date_Dimension)
The result:
Se also the attachment app.
I hope to help!
Hi Joao,
Thanks for your help ! It looks much tidier and clearer now with your method.
I just have a little issue with this: although it works very well when no Year filter is selected, once a year is selected the values wil go back to their chronological year format (2020Jan-2020Feb-2020Mar-2021Jan-2021Feb-2021Mar).
As our application has the current year filter selected by default, and I cannot change it, do you perhaps know if there are any methods that could work regarldess of the year selected ?
Thanks a lot for your help so far @joaopaulo_delco !