Skip to main content
Announcements
Jan 15, Trends 2025! Get expert guidance to thrive post-AI with After AI: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
hsalim22
Contributor

Week display

hsalim22_0-1651024741483.png

Hi Guys, i have one issue here where if we see in the image its showing 52,52 until 46 then it goes to 15. The thing i wanted to achieve is the Week 52 till 46 is the historical weeks while 15 to 1 is the updated weeks. So how to align the week accordingly for example like 51,50,49,48,47,46,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15. 15 is the latest updated week. Can anyone help me on this.

Thanks and regards.

Labels (5)
5 Replies
micheledenardi
Specialist II

i sugget to use dual() function to assing to each week number the correct sort order.

Michele De Nardi
If a post helps to resolve your issue, please accept it as a Solution.
vinieme12
Champion III

Just Use sort by Measure = Date

 

or if you have a yearWeek field in your model like like   = WeekYear(Date)&'-'&Week 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
hsalim22
Contributor
Author

Hi Michele De Nardi,

but the solution you give is referring to Qlikview whn i click the dual() link.

Regards,

Hafiz

hsalim22
Contributor
Author

Hi Vineeth Pujari,

Can you explain or show me the example as I'm new to Qlik Sense I don't really get what you're saying.

Regards,

Hafiz

vinieme12
Champion III

As below

temp:
Load
Date
,Week(Date,0,0) as Week
,WeekYear(Date,0,0)&num(Week(Date,0,0),'00') as YearWeek
;
Load Date(iterno()-1 + Date#('2021-11-01','YYYY-MM-DD')) as Date
Autogenerate 1
While Date(iterno()-1 + Date#('2021-11-01','YYYY-MM-DD')) - Date#('2022-02-28','YYYY-MM-DD')
;
exit Script;

 

In Chart

Sort Week by expression = Max(YearWeek)Sort Week by expression = Max(YearWeek)qlikCommunity.PNG

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.