Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
cristianj23a
Partner - Creator III
Partner - Creator III

Custom order in line chart

Hello, I have a line chart where I want to have the order of dates equal to my table. Example.

Captura.PNG 

As we see in the image above, in the table the 29-dic is separated into two lines because they belong to two different "CAMPAÑAS". I mean that in the graph they have to appear in different lines because the objective is to separate by "CAMPAÑAS".

 

Captura.PNG

 

Try ordering but the line of the CAMP 2019 and CAMP 2017 join and should be separated.

Please help me with the topic.

I attach the Qvw.

Greetings.

https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
Labels (1)
6 Replies
bgerchikov
Partner - Creator III
Partner - Creator III

Hi Cristian,

the problem is your chart %s are associated with the same period, which is day-month combination. Try to add year to this combination: 29-dic-2017 and use it as a dimension.

Good luck! 

jaibau1993
Partner - Creator III
Partner - Creator III

Hi Cristian! I think the problem is solved if you use

=if(len(trim(PERIOD1)), Right(CAMPAÑA, 4) & '-' & PERIOD1)

as your first dimension. Please find the attached file whith my solution!

Bests,

Jaime.

cristianj23a
Partner - Creator III
Partner - Creator III
Author

Hi Bgerchikov.


I understand that I have to add the Year but in this case the user does not want to add that, he wants it to remain the same but with the same when the Year is added.
https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
cristianj23a
Partner - Creator III
Partner - Creator III
Author

Hi Jaibau1993.

Is there another way where you do not have to add the CAMPAÑA?

Greetings.
https://www.linkedin.com/in/cristianjorge/
Do not forget to mark as "Accepted Solution" the comment that resolves the doubt.
jaibau1993
Partner - Creator III
Partner - Creator III

Hi Cristian:

I don't think you can solve it whithout changing the dimension (as I did adding the year from CAMPAÑA). If the dimension is DAY-MONTH (as it is), then both values from 2017 and 2019 will be necessarily aligned because the tag that group both values (29-dic) is the same. 

Jaime.

bgerchikov
Partner - Creator III
Partner - Creator III

Cristian,

In this case, I'd suggest to review this article by HIC:

https://community.qlik.com/t5/Qlik-Design-Blog/The-As-Of-Table/ba-p/1466130

 

As-of-Table may resolve your problem.