Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Crosstable (?)

Hi,

If I have a table like this:

AccountNoAccountNameYearActualPeriod1ActualPeriod2ActualPeriod3….ActualPeriod12BudgetPeriod1BudgetPeriod2BudgetPeriod3….BudgetPeriod12
10000Name12010145 00050 00070 000-40 000174 00060 00084 000-48 000
10000Name12011200 000100 000-300 000200 000240 000120 000-360 000240 000


Is it possible to get it like this by scritping:

AccountNoAccountNameYearPeriodActualBudget
10000Name120101145 000174 000
10000Name12010250 00060 000
10000Name12010370 00084 000
10000Name1201012-40 000-48 000
10000Name120111200 000240 000
10000Name120112100 000120 000
10000Name120113-300 000-360 000
10000Name1201112200 000240 000
1 Solution

Accepted Solutions
Not applicable
Author

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

View solution in original post

3 Replies
Not applicable
Author

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

Not applicable
Author

Hi,

This can be done by cross table.Please see the attached files for details

I hope this will help You

Thanks

Vivek

Not applicable
Author

Thanks for quick response and answers!