Forum Discussion
Order attributes
- 1 year ago
DATATABLE returns a table and not a column. You need to modify the table itself and not create a calculated column. Note: The code i gave you was just a sample which of course didn't include all attribute values.
Hi Msampedro
What do you mean by "not sure if I can consider it as a pure table since doe not appear in the Table view"? DATATABLE generates a calculated table and should appear in the Table/Data view. You can actually add an extra column using the same calc table.
Example:
DATATABLE (
"Attribute", STRING,
"Sort", INTEGER,
{
{ "Qty (Liter)", 1 },
{ "Qty ((KG+EA)", 2 }
}
)
But I would very much create this table in Excel, and import it into the model using Enter Data.
- danextian1 year agoSuper User
DATATABLE returns a table and not a column. You need to modify the table itself and not create a calculated column. Note: The code i gave you was just a sample which of course didn't include all attribute values.
- Msampedro1 year agoHelper I
Thanks, Finally it was quite easy... just about to edit Datatable formula.... thanks to help me understand the logic.
PnL Structure =
DATATABLE (
"Attribute", STRING,
"Order", INTEGER,
{
{"Qty (Liter)", 1},
{"Qty (KG+EA)", 2},
{"Net Sales", 3},
{"ASP, EUR/KG+EA", 4},
{"ASP, EUR/lt", 5},
{"Vcogs, EUR/lt", 6},
{"Variable COGS", 7},
{"Vcogs, EUR/KG+EA", 8},
{"Var FPDE", 9},
{"Var.Contribution", 10},
{"Fcogs, EUR/KG+EA", 11},
{"Fcogs, EUR/lt", 12},
{"F-COGS", 13},
{"Gross Profit", 14},
{"GM %", 15},
{"VM %", 16}
}
)