Discussion Board for collaboration related to QlikView App Development.
Hi,
I have a problem with my data. I have a budget table in our ERP system with the following structure
Account | Value Period 1 | Value Period 2 | Value Period 3 | Value Period 4 | Value Period 5 | Value Period 6 | Value Period 7 | Value Period 8 | Value Period 9 | Value Period 10 | Value Period 11 | Value Period 12 |
---|---|---|---|---|---|---|---|---|---|---|---|---|
12345 | 10 | 20 | 30 | 40 | 50 | 70 | 90 | 100 | 110 | 120 |
I would need to change the data structure so that I would have all values in same column that I am able to use that in my report, like following
Account | Period | Value |
---|---|---|
12345 | 1 | 10 |
12345 | 2 | 20 |
12345 | 3 | 30 |
12345 | 4 | 40 |
12345 | 5 | 50 |
12345 | 6 | 60 |
12345 | 7 | 70 |
12345 | 8 | 80 |
12345 | 9 | 90 |
12345 | 10 | 100 |
12345 | 11 | 110 |
12345 | 12 | 120 |
Any idea what kind of script woul do this data conversion for me?
Thanks
Regadrs
Janne Vauhkonen
You can use the crosstable function:
MyTable:
CrossTable(Period, Value)
LOAD * FROM ...my_erp_source...;
Hi Janne,
As Gysbert suggested, Crosstable concept will work here. Please see the attachment.
Thanks,
AS