Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
rohanmayekar
Partner - Contributor III
Partner - Contributor III

Sorting on trend chart not proper.......[trend chart has 1 invisible expression..]

Hi All,

I want to achieve 52 week tred chart [ even though data is available only for selected weeks during year]. To achieve this I have used following

My dimension is : ='Week '&WkNbr                 -----where WkNbr has numeric values

My Expression is :=   Num
(
(
sum({1}RawMaterialActVolBudPriceAmtGBP)
-
sum({1}RawMaterialStdVolBudPriceAmtGBP)
)/1000
,'£#,##0K;(£#,##0K)'
)

And to get 52 weeks for missing values I have used Dummy Invisible  expression  =count({1}1)

Q1.png

Although I Got the desired result, I am facing problem with sorting the X axis. Please refer below image , it is starting from week 2 and getting week 1 at the end.

Q12.png

Tried all sorting options but not getting desired value. Any help is appreciated

5 Replies
Anil_Babu_Samineni

Try this expression as Sorting Numberic Ascending? Try anyone of these

1) WKNbr

2) SubField('Week ' & WKNbr, ' ', -1)

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
rohanmayekar
Partner - Contributor III
Partner - Contributor III
Author

Not working

Anil_Babu_Samineni

Can you attach your app to test

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
rohanmayekar
Partner - Contributor III
Partner - Contributor III
Author

unfortunately i cant, due to data loaded in App.

following is the part of data model, which will get values for matching WkNbr

qDM.JPG

Anil_Babu_Samineni

Don't worry that and remove that and share scramble dataa with only one chart which you need..

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