Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
fatihsahin
Partner - Contributor
Partner - Contributor

Dynamic field generation

Hi,

I need to create a dynamic structure for one of my QlikView applications:

Lets say I have following data:

ProductionDate       V1(Jul)   V2(Aug)      V3(Sep)      V4(Oct)      V5 (Nov)   V6 (and so on)  V7      V8      V9      V10      V11      V12

July 2015                       10     0                    0               0                    0        50                      0        0       30        20       15         100

So every V1 is representing July and I have a corresponding value for every "V" value but based on that ProductionDate this V1 to V12 distribution should be dynamic. In example above V1 represents July V2 August and so on.

But lets say I have production date Oct 2015 than I want to have this:

ProductionDate          V1(Oct)   V2 (Nov)      V3 (Dec)      V4(Jan)      V5      V6      V7      V8      V9      V10      V11      V12

Oct 2015                    10          0                  0                  0               0        50       0        0       30        20       15         100

So basically the V1 to V12 distribution should be calculated dynamically based on the "ProductionDate"

Any idea how I can achieve that?

Regards

5 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Try transforming with CrossTable(), if you attach some sample file then it is easier to provide the solution.

Regards,

jagan.

Kushal_Chawda

Please see the attached.

This is what you are looking for?

fatihsahin
Partner - Contributor
Partner - Contributor
Author

Hi Kush,

thanks a lot for your example. Definetely going to the right direction but the fields V1 to V12 are 12 different fields which are containing different values but the only date we have is the productiondate.

So if the production date is for example

March 2015 the table should start with the V3 and go on like this:V4,V5,V6,......V12,V01,V02

if we have

May 2015: Starting with V5.....V12,V01,V02,V03,V04,V05

Regards

Fatih

Kushal_Chawda

if you can share sample data it will be helpful

Kushal_Chawda

If V1 to V12 are different fields then we can use cross table to bring it as values (single field)