Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

WEEK Function

Hi

I have date field YYYYWK format,I want to get WeekNumber,will Week function help here??

:

LOAD * INLINE [

    YEARWEEK

    201315

    201318

    201325

    201402

    201415

];

I want

WEEK

15

18

25

02

15

Thanks

1 Solution

Accepted Solutions
its_anandrjs

Try with

LOAD YEARWEEK, Right(YEARWEEK,2) as Week;

LOAD * INLINE [

    YEARWEEK

    201315

    201318

    201325

    201402

    201415

];

View solution in original post

5 Replies
its_anandrjs

Try with

LOAD YEARWEEK, Right(YEARWEEK,2) as Week;

LOAD * INLINE [

    YEARWEEK

    201315

    201318

    201325

    201402

    201415

];

Not applicable
Author

Thanks..its fine...but in above Inline Table we have 15th week for both Years.

I want to show week Values in Y Axis like below,How we can do it

--------------------------------------------Y

  15   18   25  02   15

Thanks

joshabbott
Creator III
Creator III

I'm assuming you aren't loading from an inline table?  Try:

Right(YEARWEEK,2) as WeekOfYear

Not applicable
Author

yes I am loading it from Database,

I would like to get

WEEK Values like WK15,WK18,WK25,WK02,WK15..

Thanks

its_anandrjs

In your table if week is for all years then you get week for all years other wise you can use the master calendar.

and for week like this way  15   18   25  02   15

You can achieve this by using the pivot table and add the dimension week and then click on the week dimension and drag it to the right hand side upper top corner of the chart then you get week like you ask.

See the attached pivot sample

Pivot table.png