Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
markgraham123
Specialist
Specialist

Create a dimension in script for every field

Hi All,

I'm trying to create an individual name in a dimension for every field.

Here is the Example:

  

Product A UnitsProduct B UnitsProduct C UnitsProduct D Units
100200300400

I'm trying to create a new dimension which would have names of the Product mapped to its units value.

                          New Dimension

Product A Units    A

Product B Units    B

Product C Units   C

Product D Units   D

I did it in the front end using Value list , Pick Match.

But i'm trying to do it in script so it can be simple on front end chart.

Any help is highly appreciated.

1 Solution

Accepted Solutions
sunny_talwar

Try something like this:

Test:

CrossTable(Dimension, Value)

LOAD RowNo() as Key,

  *;

LOAD * Inline

[

Product A Units, Product B Units, Product C Units, Product D Units

100,200,300,400

];


Capture.PNG

View solution in original post

10 Replies
sunny_talwar

Try something like this:

Test:

CrossTable(Dimension, Value)

LOAD RowNo() as Key,

  *;

LOAD * Inline

[

Product A Units, Product B Units, Product C Units, Product D Units

100,200,300,400

];


Capture.PNG

swuehl
MVP
MVP

Maybe use

The Crosstable Load

to transform your table, then you can extract your Unit e.g. using

Subfield(FIELDNAME,' ',2) as Unit

markgraham123
Specialist
Specialist
Author

Sunny,

Do we have any field count limitations to use cross table?

sunny_talwar

field count limitation? Not sure what you mean? can you elaborate?

markgraham123
Specialist
Specialist
Author

Stefan,

I'm new to the advanced concepts of data manipulation.

I really do not understand if u just give a keyword.

Anyways thanks.

markgraham123
Specialist
Specialist
Author

Like we have 2 field limitation to use Apply map.

sunny_talwar

I guess you need at least 2 fields for CrossTable to work. Cannot work if you just have 1 field.

markgraham123
Specialist
Specialist
Author

Got it.

Thank you Sunny

markgraham123
Specialist
Specialist
Author

Sunny,

Is there a chance to rename Dimension and values as other names at a time with Crosstable??

I know we can do it by loading resident in another table.

But just checking