Qlik Community

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Don't miss the upcoming Q&A with Qlik session on Qlik Application Automation on November 16th! REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
manojkumargowda
Creator
Creator

Sorting with week and year as two dimensions in line chart

Hello Experts,

I'm trying to plot a line chart to do year by year analysis. Dimensions are week numbers and year. But the problem is sorting is not working for year dimension. As I don't have 2019's early weeks data, 2020 is being shown first in the legend. But I want the year to be sorted in ascending order (i.e. 2019, 2020) in the legend.

Dimensions: week(Fact_Date), year(Fact_Date)

Measure: Sum(Fact_value)

SET DateFormat='DD/MM/YYYY';

Temp:
Load Fact_value,date#(Fact_Date,'DD/MM/YYYY') as Fact_Date inline
[
Fact_Date,Fact_value
03/04/2019,3
03/03/2019,2
03/05/2019,5
03/06/2019,7
03/02/2020,1
03/01/2020,9
03/04/2020,6
03/03/2020,4
]

  

manojkumargowda_0-1588330355332.png

 

Labels (2)
1 Reply
Deepak87
Partner
Partner

Hi,

try this...

In Sorting:

First--> Sorting "Custom" --> check in "sort by expression" (add the expression "<Year>" ) --> Ascending