Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Gabo77
Contributor III
Contributor III

Combined Graph sort problem

I have a graph made with a combined graph object in which I represent in bars values ​​of previous months of this year, and in line the values ​​of the days that have elapsed in this month. I need to order the output so that the bars appear first ordered by months and then the days also in order by day. The months must appear with notation: Jan, Feb, Mar ... and the days with spanish notation: L-04 (For Monday), Ma-05 (For Tuesday), Mi-06 (For Wednesday), J-07 (For Thursday), V-08 (For Friday), S-09 (For Saturday) (Sundays are skipped)

 

I have already managed to get the month bars to appear first and they are sorted by month. Then the days appear but for some reason it does not order them as I hope. Particularly Monday 11 (L-11) is placed at the beginning of all day values, which I don't understand why.

To do the ordering, I am using the "Periodo"dimension of the X axis but replacing its value by an expression using the formula "=Tipo&Orden" where "Tipo" is a value that is determined based on the type of value that I am going to represent A=Years, B=Months, C=Days and "Orden" is the number of the related item, if "Tipo=A" then "Orden" value is directly the year, 2020, 2021 ... If "Tipo=B" then "Orden" value is 01 for January, 02 for February and so .... and if "Tipo=C" then "Orden" value is the day of the month used directly 01, 02, 03 ...

You can see the data represented in the image of the attached table for better reference.

Gabo77_1-1634569491361.png

As you can see in the previous image, the data is ordered by the first column "Tipo&Orden" and the result is as expected, since it shows the months ordered at the beginning and then the days ordered at the end.

This is the formula I use to Sort

Gabo77_2-1634569665882.png

But in the graph it is not like that. The months appears at the beginning of the graph and the days at the end, but for some reason, the monday value (L-11) are showed at the beginning of the lines block.

Gabo77_3-1634569920839.png

This is the formula I use to order. (I replace the ordering by period to use an expression, which is the same as the one the table uses to sort by the first column)

Gabo77_4-1634570080949.png

Do you have any idea why this happens?

I thank you in advance for your support.Greetings!

Labels (2)
0 Replies