Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

sorting quarter and year values on a line chart

Hi all,

I am trying to sort quarter and year values on the x-axis on a line chart. Eg. q1-2017, q2-2017, q3-2017, Q4-2017, Q1-2018, etc

In my csv file I have two different fields for both quarters (q1, q2, q3, q4) and a year field for respective quarters (2016, 2017, 2018 etc)

I have already combined the fields in Qlik sense by Quarter_Value&'-'&Year in the line chart

Can anyone help please?

1 Solution

Accepted Solutions
sunny_talwar

May be create your field as a dual field like this

Dual(Quarter_Value&'-'&Year, Year*100 + (Right(Quarter_Value, 1) * 1), ) as QuarterYear

View solution in original post

4 Replies
sunny_talwar

May be create your field as a dual field like this

Dual(Quarter_Value&'-'&Year, Year*100 + (Right(Quarter_Value, 1) * 1), ) as QuarterYear

sibin_jacob
Creator III
Creator III

Create a new column using the below script.

Num(Year&Replace(Quarter_Value,'q','')) as Quarter_Value1

Select the Sort by Expression option, then use the newly created column.

Quarter_Value1

Then Select Ascending.

Anonymous
Not applicable
Author

thanks!

Anonymous
Not applicable
Author

Thanks!