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

How to change Week Number to Date

Hi Guys,

I'm currently stuck in the middle to change from week number in X axis to Date.

Please advise me.

In this discussion I'm attached together with my source file and below my script.

Directory;

LOAD @1,

     @2,

     @3,

     @4,

     @5,

     @6,

     @7,

     @8,

     @9,

     @10,

     @11,

     @12,

     @13,

     @14,

     @15,

     @16,

     @17,

     @18,

     @19,

     @20,

     @21,

     @22,

     @23,

     @24,

     @25,

     @26,

     @27,

     @28,

     @29,

     @30,

     @31,

     @32,

     @33,

     @34,

     @35,

     @36,

     @37,

     @38,

     @39,

     @40,

     @41,

     @42,

     @43,

     @44,

     @45,

     @46,

     @47,

     @48,

     @49,

     @50,

     @51,

     @52,

     @53,

     @54,

     @55,

     @56

FROM

[..\..\..\QlikViewSupplyDemandSharedFolder\Weekly\MatchedPlan\MatchedPlan2011.xlsx]

(ooxml, no labels, header is 3 lines, table is Vegetable, filters(

Replace(1, top, StrCnd(null)),

Replace(2, top, StrCnd(null)),

Top(1, 'Item_code'),

Remove(Row, RowCnd(CellValue, 1, StrCnd(null))),

Remove(Row, RowCnd(CellValue, 1, StrCnd(contain, 'SKU'))),

Top(2, 'Budget'),

Top(2, 'Budgets'),

Remove(Row, RowCnd(Compound,

          RowCnd(CellValue, 2, StrCnd(contain, 'Matched', not)),

          RowCnd(CellValue, 2, StrCnd(contain, 'Budgets', not))

)),

Top(3, 'Remarks'),

Remove(Row, RowCnd(CellValue, 3, StrCnd(null))),

Remove(Row, RowCnd(Compound,

          RowCnd(CellValue, 3, StrCnd(contain, 'Remarks', not)),

          RowCnd(CellValue, 3, StrCnd(contain, 'Supply Demand', not))

))

))

Where (@1)='Item_code';

2 Replies
Not applicable
Author

Hi Guy,

this is example with current year ('2011') and Mondays:

LOAD

....

     MakeWeekDate( '2011' , num(Mid(@4,6 ),'00')) AS @4,

     MakeWeekDate( '2011' , num(Mid(@5,6 ),'00')) AS @5,

. . .

HtH

Roland

Not applicable
Author

Hi Roland,

If I used the statement it will shown the 1st day of the week which is Monday date only.

How should I do if the column auto create for 1 week by 7 days and the value also will be devide to 7 column base on th days meaning start from Monday to Sunday.

Requisitioner aid

Hairul