Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

noviceqlik
New Contributor III

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?

Tags (1)
1 Solution

Accepted Solutions

Re: sorting quarter and year values on a line chart

May be create your field as a dual field like this

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

4 Replies

Re: sorting quarter and year values on a line chart

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
Contributor III

Re: sorting quarter and year values on a line chart

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.

noviceqlik
New Contributor III

Re: sorting quarter and year values on a line chart

thanks!

noviceqlik
New Contributor III

Re: sorting quarter and year values on a line chart

Thanks!

Community Browser