Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
hopkinsc
Partner - Specialist III
Partner - Specialist III

Sorting in Line Chart

Hi All,

i am trying to get a line chart sorted as per the following..

i have week number on my x axis which is currently sorted numerically (1-52) but what i want is to sort it based on the last date that data was received.

The last date is 09/10/2017 which is week 41, so i want the chart to start at week 42 and end at 41.

can anyone help please?

i have attached an example.

Thanks

1 Solution

Accepted Solutions
sunny_talwar

Try this

=Max({<MAT_Year = {'Current Year (MAT)'}>}nd_CALENDAR_YYYYMMDD)


Capture.PNG

View solution in original post

11 Replies
sunny_talwar

Try sorting by Max(Date) (Asc or Desc)

Capture.PNG

Anil_Babu_Samineni

May be use Calc. Dimension for Week like

=If(Week >= $(vMaxEndDate), Week)

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

this is the first thing i tried (and the obvious one) but it doesnt work in my live qvw!

this might be difficult for me get help with then as i cant upload my live version.

i see it works in my sample though..

sunny_talwar

What is different between this sample and live version? Set Analysis? calculated dimension? anything else?

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

No calculated dimensions and no set analysis. the only difference is the data model.

there are some synthetic keys which i will sort out now but up until now they've caused no problems.

maybe its those that are stopping this from working

sunny_talwar

Very difficult to say....

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

no worries, thanks for your help, i will sort out these synthetic keys and try again.

hopkinsc
Partner - Specialist III
Partner - Specialist III
Author

i have managed to get an example where its not working.

any chance you could see if anything jumps out? !

sunny_talwar

Try this

=Max({<MAT_Year = {'Current Year (MAT)'}>}nd_CALENDAR_YYYYMMDD)


Capture.PNG