Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

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.

Labels (1)
6 Replies
Partner
Partner

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! 

Highlighted
Partner
Partner

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.

Highlighted
Partner
Partner

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.
Highlighted
Partner
Partner

Hi Jaibau1993.

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

Greetings.
Highlighted
Partner
Partner

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.

Highlighted
Partner
Partner

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.