Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

using cross table and creating date fields

Hi I am using the cross table to convert 4 fields into 1 field as shown below.

CrossTable (FN,Value,5)

LOAD [ID],

     [ Name],

     [Data Type],

     [Type],

     [Date],

     NIT_N_1_F1,

     NIT_N_2_F1,

     NIT_N_3_F1,

     NIT_N_4_F1;

and it works but now I want the  NIT_N_1_F1 shown as WeekDate i.e 7/10/2015 &

NIT_N_2_F1 as -7 i.e. 7/03/2015

NIT_N_3_F1 as -7 i.e. 6/26/2015

NIT_N_4_F1 as -7 i.e. 6/19/2015

..

..

..

NIT_N_106_F1 as -7 i.e. ********

CAN ANYONE HELP ME IN WRITIN THE QLIKVIEW SCRIPT.

Thanks in advance......................

16 Replies
robert_mika
Master III
Master III

Could you attached your source file?

Not applicable
Author

cannot attach the source file

petter
Partner - Champion III
Partner - Champion III

You don't want to write the 106 lines manually?

Not applicable
Author

yes i don't want to write.

and I write also i can not write them every week can we manage by using the variable in any way.

petter
Partner - Champion III
Partner - Champion III

So there will be one more column each week? But the number of columns will not increase indefinitely will they?

Not applicable
Author

106 is constant but every week one week drops and one weeks adds on

petter
Partner - Champion III
Partner - Champion III

Then it is very easy to make a formula in Excel which increments the column number in the middle of the string by one and copying the formula down 105 times... copying the resulting 106 rows into your load script... it is done in less than two minutes ...

petter
Partner - Champion III
Partner - Champion III

NIT_N_1_F1,
NIT_N_2_F1,
NIT_N_3_F1,
NIT_N_4_F1,
NIT_N_5_F1,
NIT_N_6_F1,
NIT_N_7_F1,
NIT_N_8_F1,
NIT_N_9_F1,
NIT_N_10_F1,
NIT_N_11_F1,
NIT_N_12_F1,
NIT_N_13_F1,
NIT_N_14_F1,
NIT_N_15_F1,
NIT_N_16_F1,
NIT_N_17_F1,
NIT_N_18_F1,
NIT_N_19_F1,
NI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105_F1,
NIT_N_106_F1
Not applicable
Author

it works but now I want the  NIT_N_1_F1 shown as WeekDate i.e 7/10/2015 &

NIT_N_2_F1 as -7 i.e. 7/03/2015

NIT_N_3_F1 as -7 i.e. 6/26/2015

NIT_N_4_F1 as -7 i.e. 6/19/2015