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: 
Not applicable

Week/Year for X-Axis

Hi:

Can't seem to find a previous discussion on this. I currently have a variable created in the script to give me YEAR_MONTH

Which works great. Seeking to do the same to add to a Cyclic Group dimension for a series of charts and thought I was home free with this, which loads without error: 

date(WeekStart(APPROVED_DATE),'WW-YY')) as APP_YEARWEEK

But the resulting field shows me, which looks right except for the 00.

3-4-2013 3-34-09 PM.png

Document format is

3-4-2013 3-36-43 PM.png

What am I missing?

thanks in advance.

Jim

1 Solution

Accepted Solutions
sivarajs
Specialist II
Specialist II

trim(date(TempDate,'WW-YY')) as APP_YEARWEEK

View solution in original post

4 Replies
sivarajs
Specialist II
Specialist II

trim(date(TempDate,'WW-YY')) as APP_YEARWEEK

Not applicable
Author

Thanks, this works, though sorting seems to be a problem. I'll work it out.

Not applicable
Author

and your sort suggestion worked as well. Thanks for your help.

sivarajs
Specialist II
Specialist II

Give SubField(wk_yr,'-',2)&SubField(wk_yr,'-',1) as your sort expression to sort asc or desc by week and year