Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

crosstable with indicators in line

hello

i want to have a table with indicator in line like this :

Indicator \ Year   2015  2014

CA                         20  52

VOL                        20  55

QTY                         10   10

Can you tell me how to do it pls.


Thks in advance

7 Replies
sunny_talwar

You want it like this?

Indicator     Year     Value

CA             2015     20

CA             2014     52

VOL           2015     20

VOL           2014     55

QTY           2015     10

QTY           2014     10

sunny_talwar

If yes, then try the following script:

Table:

LOAD * Inline [

Indicator, 2015, 2014

CA, 20, 52

VOL, 20, 55

QTY, 10, 10

];

NewTable:

CrossTable (Year, Data, 1)

LOAD *

Resident Table;

DROP Table Table;


Output:


Capture.PNG

Not applicable
Author

I want it like this

Indicator \ Year   2015  2014

CA                       20     52

VOL                     20     55

QTY                     10     10

but if i have this one i'll do what i want

Indicator     Year     Value

CA             2015     20

CA             2014     52

VOL           2015     20

VOL           2014     55

QTY           2015     10

QTY           2014     10

sunny_talwar

I am unsure of how your data is right now and how you want it to look like. Can you share an example of what your data looks like?

Best,

Sunny

Not applicable
Author

The data comes from a database not from a file, i have a dimension named Time, Product, Saler and the fact table Sales.

sunny_talwar

Your data looks like this?

Indicator \ Year  2015  2014

CA                      20    52

VOL                    20    55

QTY                    10    10

or this?

Indicator    Year    Value

CA            2015    20

CA            2014    52

VOL          2015    20

VOL          2014    55

QTY          2015    10

QTY          2014    10


This is what is confusing me right now.

Not applicable
Author

Here the table that i want to pivotcap.png