Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
agni_gold
Specialist III
Specialist III

Generate Week Numbers as Filed during resident load

I gave a table , contains Week start date and week end date and other columns ,

But i want to load the resident as week numbers also

1

2

3

4

5

6

7

8

9.........

..

..

..

..

52  as Week field.

How can i do that ....

thanks

18 Replies
ecolomer
Master II
Master II

Probably this one is more clair for you

agni_gold
Specialist III
Specialist III
Author

Yes but you are creating saprate table but i need same thing during resident load from source table.

MarcoWedel

Please post example data and desired output.

agni_gold
Specialist III
Specialist III
Author

How you decided

autogenerate 2190;


2190 value

agni_gold
Specialist III
Specialist III
Author

I am attaching excel for data .

excel contains two sheets sorce data and desired output please have a look

agni_gold
Specialist III
Specialist III
Author

How you decided

autogenerate 2190;


2190 value

MarcoWedel

Hi,

maybe like this?:

QlikCommunity_Thread_131315_Pic2.JPG.jpg

LOAD *,

    Week([Month Date]) as Week;

LOAD Date([Month Date], 'MMM') as month,

    Year,

    value,

    Date([Month Date]+IterNo()-1) as [Month Date]

While [Month Date]+IterNo()-1 <= MonthEnd([Month Date]);

LOAD *,

    Date(Date#('1-'&month&'-'&Year)+IterNo()-1) as [Month Date]

FROM [http://community.qlik.com/servlet/JiveServlet/download/598314-122554/Data.xlsx] (ooxml, embedded labels, table is [Sorce Data]);

hope this helps

regards

Marco

ecolomer
Master II
Master II

This is only for tests

ecolomer
Master II
Master II

Is only for tests, and is 2190 = 365 (year) x 6