Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

sankar_ganesh
New Contributor

How to add fields dynamically in the script

Hello,

I want to convert the Table1 into Table2 , as given below. This needs to create fields dynamically in Table2 based on the counts of 'Code' aggr. by 'Date' in Table1.

Does anyone have any idea to implement this..

Table1:

DateCode
5/8/2013a
5/8/2013b
6/8/2013c
6/8/2013d
7/8/2013e
7/8/2013f
8/8/2013g
8/8/2013h
9/8/2013i
9/8/2013j
9/8/2013k
10/8/2013l
10/8/2013m
10/8/2013n
10/8/2013o

                                      

 

Table2:

DateF1F2F3F4
5/8/2013ab
6/8/2013cd
7/8/2013ef
8/8/2013gh
9/8/2013ijk
10/8/2013lmno

Thanks,

Sankar

1 Solution

Accepted Solutions

Re: Re: How to add fields dynamically in the script

See attached qvw


talk is cheap, supply exceeds demand
4 Replies

Re: How to add fields dynamically in the script

See the attached example.


talk is cheap, supply exceeds demand
sankar_ganesh
New Contributor

Re: How to add fields dynamically in the script

Hello Gysbert,

thanks for you help. Here the important point to be noted is that the no. of fields in Table2 depends on the max. no. of count of code per day.

in the above example,at any day if i get max. count of codes per day is 6 then fields F1,F2...F6 need to be created, if it is 20 on the next day then F1..F20 have to be created. is it possible ?

Re: Re: How to add fields dynamically in the script

See attached qvw


talk is cheap, supply exceeds demand
sankar_ganesh
New Contributor

Re: How to add fields dynamically in the script

Thanks Wassenaar, this is exactly what i wanted !!

Community Browser