Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
If I have a table like this:
AccountNo | AccountName | Year | ActualPeriod1 | ActualPeriod2 | ActualPeriod3 | …. | ActualPeriod12 | BudgetPeriod1 | BudgetPeriod2 | BudgetPeriod3 | …. | BudgetPeriod12 |
10000 | Name1 | 2010 | 145 000 | 50 000 | 70 000 | -40 000 | 174 000 | 60 000 | 84 000 | -48 000 | ||
10000 | Name1 | 2011 | 200 000 | 100 000 | -300 000 | 200 000 | 240 000 | 120 000 | -360 000 | 240 000 |
Is it possible to get it like this by scritping:
AccountNo | AccountName | Year | Period | Actual | Budget |
10000 | Name1 | 2010 | 1 | 145 000 | 174 000 |
10000 | Name1 | 2010 | 2 | 50 000 | 60 000 |
10000 | Name1 | 2010 | 3 | 70 000 | 84 000 |
… | |||||
10000 | Name1 | 2010 | 12 | -40 000 | -48 000 |
10000 | Name1 | 2011 | 1 | 200 000 | 240 000 |
10000 | Name1 | 2011 | 2 | 100 000 | 120 000 |
10000 | Name1 | 2011 | 3 | -300 000 | -360 000 |
… | |||||
10000 | Name1 | 2011 | 12 | 200 000 | 240 000 |
Hi,
Yes you can.. You can either use transpose functionality of Qlikview or by using scripting.
If you are using scripting, then it should be something like this;
Load AccountNo,
AccountName,
Year,
'1' as Period,
ActualPeriod1 as Actual,
BudgetPeriod1 as Budget
from xxxx;
concatenate
Load AccountNo,
AccountName,
Year,
'2' as Period,
ActualPeriod1 as Actual,
BudgetPeriod1 as Budget
from xxxx;
concatenate
...
...
...
so on...
BR
Omer
Hi,
Yes you can.. You can either use transpose functionality of Qlikview or by using scripting.
If you are using scripting, then it should be something like this;
Load AccountNo,
AccountName,
Year,
'1' as Period,
ActualPeriod1 as Actual,
BudgetPeriod1 as Budget
from xxxx;
concatenate
Load AccountNo,
AccountName,
Year,
'2' as Period,
ActualPeriod1 as Actual,
BudgetPeriod1 as Budget
from xxxx;
concatenate
...
...
...
so on...
BR
Omer
Hi,
This can be done by cross table.Please see the attached files for details
I hope this will help You
Thanks
Vivek
Thanks for quick response and answers!