Creating Cube Generates "Cell type is string" error

Post Reply
User avatar
ptownbro
Posts: 31
Joined: Wed Apr 05, 2017 3:03 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013
Location: Los Angeles, CA

Creating Cube Generates "Cell type is string" error

Post by ptownbro »

Just started learning and am creating my first cube. When running my TI process to create the cube I'm getting a "Cell type is string" error on every row from by data source. I'm not sure what you will need to help, so forgive me if this is long.

My data source is from a SQL Server ODBC connection to a simple data warehouse that has 5 dimensions and one fact table. The fact table joins to each dimension using an "ID" column. The query looks as follows:

Code: Select all

SELECT 
    VersionName, YearName, PeriodName, CenterName, AccountName, FinancialAmount
FROM
    FactFinancial FT
    INNER JOIN DimVersion D1 ON D1.VersionID = FT.VersionID
    INNER JOIN DimYear D2 ON D2.YearID = FT.YearID
    INNER JOIN DimPeriod D3 ON D3.PeriodID = FT.PeriodID
    INNER JOIN DimCenter D4 ON D4.CenterID = FT.CenterID
    INNER JOIN DimAccount D5 ON D5.AccountID = FT.AccountID
I've created Dimensions in TM1 related to each of the columns in my query above. These dimensions are based on the Dimension tables in my DW and used the 'Name' fields from each of those tables (e.g. VersionName, YearName, etc..) as the element.

Within the cube, the variables I selected were as follows:

vVersion - has 'Sting' variable type and 'Element" as content
vYear - has 'Sting' variable type and 'Element" as content
vPeriod - has 'Sting' variable type and 'Element" as content
vCenter - has 'Sting' variable type and 'Element" as content
vAccount - has 'Sting' variable type and 'Element" as content
vFinancialAmount - has 'Numeric' variable type and 'Data' as content

The Advance tab has this in the epilog:

Code: Select all

#****Begin: Generated Statements***
CellPutN(FinancialAmount,'Sample Financials',vVersionName,vYearName,vPeriodName,vCenterName,vAccountName);
#****End: Generated Statements****
That's it!

One other thing... I couldn't figure out how to actually create the measure, but I assumed that setting the 'vFinancialAmount' variable as 'Data' content did it automatically.
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Creating Cube Generates "Cell type is string" error

Post by Alan Kirk »

ptownbro wrote: Thu Sep 14, 2017 11:58 pm Just started learning and am creating my first cube. When running my TI process to create the cube I'm getting a "Cell type is string" error on every row from by data source. I'm not sure what you will need to help, so forgive me if this is long.

My data source is from a SQL Server ODBC connection to a simple data warehouse that has 5 dimensions and one fact table. The fact table joins to each dimension using an "ID" column. The query looks as follows:

Code: Select all

SELECT 
    VersionName, YearName, PeriodName, CenterName, AccountName, FinancialAmount
FROM
    FactFinancial FT
    INNER JOIN DimVersion D1 ON D1.VersionID = FT.VersionID
    INNER JOIN DimYear D2 ON D2.YearID = FT.YearID
    INNER JOIN DimPeriod D3 ON D3.PeriodID = FT.PeriodID
    INNER JOIN DimCenter D4 ON D4.CenterID = FT.CenterID
    INNER JOIN DimAccount D5 ON D5.AccountID = FT.AccountID
So far, so good.
ptownbro wrote: Thu Sep 14, 2017 11:58 pm I've created Dimensions in TM1 related to each of the columns in my query above. These dimensions are based on the Dimension tables in my DW and used the 'Name' fields from each of those tables (e.g. VersionName, YearName, etc..) as the element.
OK, but I'd be taking a close look at what element types you specified for those dimensions if I were you, particularly for the last dimension of the cube. If the elements are an "S" type rather than "N", that's where your problem will be. For verily, the error that you see is not to do with the cube creation, but the attempt to write values into the cube. Specifically, you appear to be trying to write a numeric value into a string cell, which is defined by the element type of the last dimension in the cube.
ptownbro wrote: Thu Sep 14, 2017 11:58 pm Within the cube, the variables I selected were as follows:

vVersion - has 'Sting' variable type and 'Element" as content
vYear - has 'Sting' variable type and 'Element" as content
vPeriod - has 'Sting' variable type and 'Element" as content
vCenter - has 'Sting' variable type and 'Element" as content
vAccount - has 'Sting' variable type and 'Element" as content
vFinancialAmount - has 'Numeric' variable type and 'Data' as content
There's part of the problem; if you don't specify the content as "Other" then you are relying on code generated by the TI wizard. The quality of such code is IMHO on a par with the quality of the soap scum that you scrape from your shower recess. It's sole redeeming feature is that at least it's not bloody Performance Muddler.

You really need to learn how to craft code manually. Use the wizard generated code as a guide but nothing more. In short, you will need to add the new elements in the Metadata tab (the Reference Guide will show you all of the relevant functions, but the existing wizard generated code will probably have the right ones as well), then you write the values in the Data tab.

Which is why I doubt that this is the case:
ptownbro wrote: Thu Sep 14, 2017 11:58 pm The Advance tab has this in the epilog:

Code: Select all

#****Begin: Generated Statements***
CellPutN(FinancialAmount,'Sample Financials',vVersionName,vYearName,vPeriodName,vCenterName,vAccountName);
#****End: Generated Statements****
The Prolog is executed before any record in the data source (if there is one) is processed. The Epilog is processed after the last record in the data source has finished. The Metadata tab code runs once for each record in the data source, with the values for that record being read into the process' variables. The Data tab does the same. Any CellPutNs which are based on the data source should be on the Data tab, not the Epilog tab.
ptownbro wrote: Thu Sep 14, 2017 11:58 pm One other thing... I couldn't figure out how to actually create the measure, but I assumed that setting the 'vFinancialAmount' variable as 'Data' content did it automatically.
Yes, that's why you can't rely on the Wizard-generated code. You can't create a measure automatically, unless it's one of the dimensions that you've set as the Element type. In the case above it appears that you have 5 dimensions; Version, Year, Period, Centre and Account. (If that's not the case then your code has a bigger problem.) In such a case "Account" becomes your de facto "Measure" dimension. Although TM1 does not use "Measure" dimensions as such, it does allow a dimension to be flagged as the measure dimension for talking to other systems which require one. Also you will sometimes hear (usually the last) dimension (account in this case) referred to informally as "the measure dimension" since the account entry usually defines "what" a value is, while the others define "where" it is.

The first problem is that you can't change a cube "on the fly" so if you want to add a "Measure" dimension (like a dimension which contains one element for "Revenue" and one element for "Volume", as an example) you would need to destroy your existing cube and create a new one with such a dimension. You would then need to manually insert code into your Data tab which works out which of those measures the value goes to, and write your own CellPutN. (And set vFinancialAmount's content to "Other" to tell the wizard not to do that for you.)

However we'd need a bit more information on what you're considering the "measure" to be before being more specific than that. If you only need to store one value per account (for any given combination of the other dimensions), then you don't need an explicit Measure dimension; the Account dimension will serve that role well enough.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
User avatar
ptownbro
Posts: 31
Joined: Wed Apr 05, 2017 3:03 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013
Location: Los Angeles, CA

Re: Creating Cube Generates "Cell type is string" error

Post by ptownbro »

First thanks for taking the time to respond. Much appreciated! And, great info.

You are correct. I only have 5 dimensions: Version, Year, Period, Center, Account. I don’t have any other dimensions or measures defined (I couldn't figure out how to create or define a measure - see more about that below)

I created/setup all the dimensions exactly the same way. Using the “Version” dimension as an example, here are my settings:
  • Source Query: Select VersionID, VersionName, VersionType From DimVersion
  • Variables:
    “vVersionID” as Variable Name, “String” as Variable Type, “Ignore” as Contents
    “vVersionName” as Variable Name, “String” as Variable Type, “Element” as Contents
    “vVersionType” as Variable Name, “String” as Variable Type, “Attribute” as Contents
  • Dimension Mapping:
    “vVersionName” as Element Variable and “String” as Element Type
  • Attribute Mapping:
    “vVersionType” as Attribute Variable and “Text” as Attribute Type for the
The exact error I'm getting is as follows (I get this for each row, but here are 3 rows as a sample):

"Actual","2014","P01","Location 1","Revenues","-1000",Data Source line (1) Error: Data procedure line (3): Cell type is string
"Actual","2014","P01","Location 1","COGS","250",Data Source line (2) Error: Data procedure line (3): Cell type is string
"Actual","2014","P01","Location 1","Labor","300",Data Source line (3) Error: Data procedure line (3): Cell type is string

The thing that seems suspicious to me is that there isn't a place I could find to create a measure which in my example is the 'FinancialAmount' column in my fact able. The only thing that seemed to make sense was define that column's associated variable with a "Data" contents in the cube.

I've done a lot of development in SSAS and when you create a cube like this in that world, you would, following my example, first create a Measure Group (made up of the 'FinancialAmont' column as my measure) and then would create the 5 dimensions.

TM1 didn't have a place to create a Measure as I understand them in SSAS. What am I missing here? I'm thinking there is some basic/fundamental concept in TM1 I'm not understanding when it comes to measures. Why would it think my Account dimension is a measure? It's a dimension.
User avatar
Alan Kirk
Site Admin
Posts: 6606
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: Creating Cube Generates "Cell type is string" error

Post by Alan Kirk »

ptownbro wrote: Fri Sep 15, 2017 2:46 am First thanks for taking the time to respond. Much appreciated! And, great info.

You are correct. I only have 5 dimensions: Version, Year, Period, Center, Account. I don’t have any other dimensions or measures defined (I couldn't figure out how to create or define a measure - see more about that below)

I created/setup all the dimensions exactly the same way. Using the “Version” dimension as an example, here are my settings:
  • Source Query: Select VersionID, VersionName, VersionType From DimVersion
  • Variables:
    “vVersionID” as Variable Name, “String” as Variable Type, “Ignore” as Contents
    “vVersionName” as Variable Name, “String” as Variable Type, “Element” as Contents
    “vVersionType” as Variable Name, “String” as Variable Type, “Attribute” as Contents
  • Dimension Mapping:
    “vVersionName” as Element Variable and “String” as Element Type
  • Attribute Mapping:
    “vVersionType” as Attribute Variable and “Text” as Attribute Type for the
The exact error I'm getting is as follows (I get this for each row, but here are 3 rows as a sample):

"Actual","2014","P01","Location 1","Revenues","-1000",Data Source line (1) Error: Data procedure line (3): Cell type is string
"Actual","2014","P01","Location 1","COGS","250",Data Source line (2) Error: Data procedure line (3): Cell type is string
"Actual","2014","P01","Location 1","Labor","300",Data Source line (3) Error: Data procedure line (3): Cell type is string

The thing that seems suspicious to me is that there isn't a place I could find to create a measure which in my example is the 'FinancialAmount' column in my fact able. The only thing that seemed to make sense was define that column's associated variable with a "Data" contents in the cube.

I've done a lot of development in SSAS and when you create a cube like this in that world, you would, following my example, first create a Measure Group (made up of the 'FinancialAmont' column as my measure) and then would create the 5 dimensions.

TM1 didn't have a place to create a Measure as I understand them in SSAS. What am I missing here? I'm thinking there is some basic/fundamental concept in TM1 I'm not understanding when it comes to measures. Why would it think my Account dimension is a measure? It's a dimension.
It might be helpful if you read my original reply a little more slowly and carefully.
You wrote:“vVersionName” as Element Variable and “String” as Element Type
after
I wrote:Specifically, you appear to be trying to write a numeric value into a string cell, which is defined by the element type of the last dimension in the cube.
I had therefore already told you why this was happening and what to look for, but to be clearer: If you have defined all of your elements as string types, which is what you appear to have done, you will not be able to write numeric values into them. If you try to write a numeric value into a string cell, you will get that error because you are entering the wrong type of data. It's exactly the same as if you try to punch the word "Hallibut" into a Currency field in SQL Server.There is nothing suspicious about it, there is nothing measures-related about it, it is just that that cell does not store numbers because you TOLD it not to store numbers.

Unless you (a) know that an element needs to store text data and (b) You are putting that element into the last dimension in a cube, all leaf level elements should be of type N or Numeric, not string.
You wrote:there isn't a place I could find to create a measure which in my example is the 'FinancialAmount' column
No, it isn't. That is the value.
I wrote:In such a case "Account" becomes your de facto "Measure" dimension. Although TM1 does not use "Measure" dimensions
You wrote:Why would it think my Account dimension is a measure? It's a dimension.
It doesn't. As I said, TM1 could not care less about the concept of a "measure". It does not exist within TM1 itself. At all. I also said that the last dimension is informally known as the measures dimension, informally being the key word. The collection of all account elements is the dimension. The individual account is the "measure", informally speaking. That's because an account number tells you what the value of an item is. But if you find that confusing, just ignore it completely and repeat to yourself several times "TM1 has no measure". It doesn't need one, because each value is stored at the intersection of ONE element from EACH dimension.

It's exactly the same as an Excel worksheet, just with more dimensions. A value might be found at Sheet 1, Row 5, column F. What's the measure? It doesn't exist. You might put descriptive labels in column A to describe what the values are, but they are completely unnecessary to finding that value from its sheet, row and column coordinates.

In TM1's case the value (not measure, but value) of -1000 will be found at the intersection of the elements:
"Actual" from the Version dimension,
"2014" from the Years dimension
"P01" from the Period dimension
"Location 1" from the Centres dimension and
"Revenues" from the Account dimension.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
User avatar
ptownbro
Posts: 31
Joined: Wed Apr 05, 2017 3:03 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013
Location: Los Angeles, CA

Re: Creating Cube Generates "Cell type is string" error

Post by ptownbro »

I've re-read both of your replies a few times and believe I understand the concept of "Measures" in TM1. I also understand that trying to place in a numeric value in a string cell type in TM1 will generate an error. However, I still don't understand why/how I'm getting an error in my design.

I'm glad you brought up the Excel analogy because it lead me to designing a simpler solution to try to illustrate my confusion.

I've set up the following data source based on an Excel-like concept where the rows and columns are dimensions. And each intersection has cell value (aka measure value).

Here are my settings for the cube creation:

Data Source:
_
RowColumnCellValue
R1C1110
R1C2120
R2C1210
R2C2220

Variables:
_
Variable NameVariable TypeContents
vRowsStringElement
vColumnStringElement
vCellValueNumericData

Dimension Mapping: (Note. I already created the "Dim Rows" and "Dim Columns" dimensions. Both have "String" element types.)
_
Elment VariableDimensionOrder in CubeElement Type
vRowsDim Rows1String
vColumnDim Columns2String

Advanced Data Code (btw... in my OP I mistakenly said this was on the epilog tab):

Code: Select all

#****Begin: Generated Statements***
CellPutN(vCellValue,'Simple Cube',vRow,vColumn);
#****End: Generated Statements****
Error Message:

Code: Select all

"R1","C1","110",Data Source line (2) Error: Data procedure line (3): Cell type is string
"R1","C2","120",Data Source line (3) Error: Data procedure line (3): Cell type is string
"R2","C1","210",Data Source line (4) Error: Data procedure line (3): Cell type is string
"R2","C2","220",Data Source line (5) Error: Data procedure line (3): Cell type is string
I don't understand why this gives me errors:
  • None of my Elements in the Dimensions have any numeric values. They are all string. That is why I set both the "Variable Type" and "Element Type" as "String"
  • Even when I change the "Element Type" to "Numeric", I still get the error! So, I don't see why/how the emphasis of that relates to this error.
I'm assuming the "Cell" (or "Value") is associated with my "CellValue" variable which has a "Variable Type" of "Numeric" and a "Contents" set to "Data". If that is the case, how does the "cell" have a "string" cell type? Isn't the "cell" whatever I set as "Data" in "Contents" (which is "Numeric")?

Sorry.... and thanks for your help... But, this is not making sense.
lotsaram
MVP
Posts: 3651
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Creating Cube Generates "Cell type is string" error

Post by lotsaram »

Let's give Alan a break from replying to you or I fear he may blow a gasket.

First let's go back to square 1.
  • In TM1 all dimensions are equal. There is no special treatment for time or measure dimensions.
  • In the cube properties you can assign a dimension as the measure dimension. But this is just for external compatibility with front ends (like Cognos BI) which require a measure dimension. Internally TM1 doesn't give a hoot.
  • TM1 knows only 2 types of data; numeric and string. Data in TM1 cubes is typed by the element type of the last dimension in the cube.
  • As the last dimension is responsible for data typing nominally this would be refereed to as the "measure dimension".
  • The element type of all other dimensions has no bearing on the data that can be stored in the cube.
  • The standard element type is numeric (N) as typically TM1 deals with numeric data.

To point out the bleeding obvious here is your problem. It is literally staring you in the face.
ptownbro wrote: Sat Sep 16, 2017 3:34 am Dimension Mapping: (Note. I already created the "Dim Rows" and "Dim Columns" dimensions. Both have "String" element types.)
_
Elment VariableDimensionOrder in CubeElement Type
vRowsDim Rows1String
vColumnDim Columns2String
As Alan already told you. You typed the cell as string. Why would you then be surprised when you then receive an error when you try to load numeric data to the cell? If you want to store numeric data then it needs to be loaded to a numeric element.

Note the "element type" refers to the type of data to be stored. It does not have anything to do with the name of the element. All element names are strings. A dimension element can be called whatever you like; doesn't stop it being typed as N. So solution to your issue: redefine your dimensions and type the elements correctly as numeric, not as strings.

If this is still confusing I suggest you read through the the manuals, particularly the end user guide and developer guide. They may be dated but they really are quite good. If you want something more then "IBM Cognos TM1: The Official Guide" is the only textbook type reference worth having (you can find it easily on Amazon). There are others but they are of really poor quality compared to this one.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Wim Gielis
MVP
Posts: 3105
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Creating Cube Generates "Cell type is string" error

Post by Wim Gielis »

It's really just as simple as this.
Elements in dimensions are strings, text.
Like cost center "Facility" or month "March" or customer "XYZ". Also Year 2017 is a string, it's not the number 2017. You create / update the dimensions either manually, either with a process.

But the data they contain when the dimensions are used in a cube, can be text or numeric. Let's say roughly about 90% of the time we will want to have numbers in the cube and 10% or so it will be text that is stored in the cube.

A cell can hold a number or text, it's one or the other. That depends on the element type of the element in the last dimension of the cube. If the element type is C for Consolidated, it's numeric. If it's N or simple, it's numeric. If it's S for String it's text.

A cell will we consolidated if all of the elements it references are numeric and lowest level in their respective dimensions. Once an element is consolidated the whole cell will be consolidated. Entering a number on a consolidated cell will spread that value of the underlying cells that make up the consolidation.

So when you use that bloody wizard set the element type to numeric. Only elements in your last dimension ("measures" dimension) could be string elements or you will end up with numeric cells anyway. Of all the elements of measures dimensions the vast majority is numeric usually, the others are string (to capture comments, maybe dates, picklists/selections, ...)

Hope this helps.
Best regards,

Wim Gielis

IBM Champion 2024
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
User avatar
gtonkin
MVP
Posts: 1192
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: Creating Cube Generates "Cell type is string" error

Post by gtonkin »

My two cents worth on this as it was explained to me in a similar manner as what Alan, Lotsaram and Wim have said but at the time it made no sense and seemed to contradict.

This is basically what I tell new starters (trimmed down version):
Dimensions contain elements. Elements are the things that give the data context.
A cube is a bucket of data. Dimensions give structure to the bucket.

When creating dimensions in TM1 and adding elements, elements against which you are going to store data are always added as numeric UNLESS the data/facts you want to store is text e.g. an address, first name etc. if you were building an employee cube (ignoring attributes-another discussion) - text would be stored against String elements which reside in the last dimension, generally termed the measures dimension (could be a chart of accounts etc.)

Anything in a String element is simply stored at the lowest level i.e. against leaf elements across all other dimensions within the cube. Strings do not and cannot aggregate naturally.

This is where the real crux of the matter is. For the most part assume that you want absolutely everything to be able to aggregate within each hierarchy in each dimension. To do this you now know that you need to define elements as type N for numeric or for hierarchies, type C for Consolidations or aggregations.

So far so good - now comes TI and confuses the matter (using formulas in Excel follows the same principles).

To reference an element in a dimension, you need to reference as a string e.g. 2017 as an element in the year dimension would be defined as N for numeric but you need to reference it as "2017" when doing any dimension or cube related functions.

When writing to the cube, you now only need to worry about your measures dimension and the measures you will be populating - if these are numeric e.g. balance sheet, income statement etc. they will obviously be numeric - similarly, names, addresses etc. would need to be strings.

Hope this helps to clarify a bit further.
Last edited by gtonkin on Sat Sep 16, 2017 6:07 pm, edited 1 time in total.
User avatar
ptownbro
Posts: 31
Joined: Wed Apr 05, 2017 3:03 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2013
Location: Los Angeles, CA

Re: Creating Cube Generates "Cell type is string" error

Post by ptownbro »

Thank you lotsaram, Wim, and gtonkin. After piecing it all together, I think I get it. And... the problem has been fixed!

The problem and associated fix was staring in my face (as lotsaram mentioned and Alan tried to explain) which was to change the "Element Type" to "Numeric" instead of "String". After that, the "Cell type is string error" went away.

BUT... to be fair to myself :D ... how to fix that problem was not so obvious. Here's what I mean.

If you look at my previous post, I did mention that changing the Element Type to "Numeric" did not fix the problem:
Even when I change the "Element Type" to "Numeric", I still get the error! So, I don't see why/how the emphasis of that relates to this error.
So, hopefully my continued confusion in previous posts can be forgiven.

My problem was that I was changing the Element Type in the wrong place - during the cube creation process!

If you recall from my OP, this error was occurring during my TI cube creation process. Within that process, I had originally set the Element Type to "String" to match what I had done when I originally created the Dimensions (and because I misunderstood at the time what Element Type was - more on that later). Then, to fix that problem based on everyone's input, I tried to change the Element Type from "String" to "Numeric" during my cube creation process, but it seems that doing that during the cube creation process doesn't do anything (now I understand why Alan was saying the wizard was unreliable to put it kindly).

This became evident after I rebuilt everything from scratch, set the Element Type to "Numeric" (or simple) during the creation of the Dimension instead of during the creation of the Cube. When doing so, I looked at the Advanced Metadata tab and viewed the following code which creates the elements with the appropriate Element Type of 'n':

Code: Select all

#****Begin: Generated Statements***
DIMENSIONELEMENTINSERT('Simple Columns','',vColumn,'n');
DIMENSIONELEMENTINSERT('Simple Rows','',vRow,'n');
#****End: Generated Statements****
However, during the creation of the Cube, I noticed when I changed the Element Type "String" to "Numeric" (and back and forth) the Advanced Metadata tab had the following code:

Code: Select all

#****Begin: Generated Statements***
#****End: Generated Statements****
So, in sum, I was trying to fix the problem in the wrong place.

Anyway, my problem is now solved and thanks everyone for your help!



For those interested and to hopefully help other beginners... keep reading below for more notes:
------------------------------------------------------------------------------------------------------------------------

I must say that none of this seems very intuitive to me, especially if you have experience in other database or cube development applications.

What I've learned through this is, first the concept "Measures" in TM1 is fairly loose. You can optionally create a "Measure" by creating a Dimension as a (theoretical) "Measure" Dimension (see https://youtu.be/lihralyjyRw video as simple example of this method). Or, if you do not specifically create a "Measure" Dimension, TM1 will informally treat your last Dimension in the Cube as the "Measure" Dimension. Last, though you can set a Dimension as a "Measure" Dimension in the Cube properties, TM1 doesn't use that information other than to communicate what a Measure is to other applications.

As for Element Types, I was thinking of them as being similar in concept to "Data Types" in the world of relational databases as well as SSAS. In those contexts, Data Types define what type the record or element value is (string, numeric, etc.). I thought the same would be true here, where "Element Type" would define what type the "Element" value is (string, numeric, etc.). As I'm now understanding, and as strange as it sounds to me, Element Type does not define the type for the Element value, but instead defines the type for the cube "Cell" value that the Element is associated with.

Not too intuitive in my opinion, but once you get it, and hopefully I do, it makes sense.

Another thing I think I now understand are what "Variables" and "Variable Types" really are and how they are used.

For those familiar with script programming (VB, C#, VBA, etc...), the Variables are really variables, as aptly named, that are being passed to arguments of a Sub or Function procedure created by the TI wizard. Call me slow... but this wasn't so obvious to me at first.

For example in the following procedures, you can see that my Variables ("vRow", "vColumn", and "vCellType") were passed to the arguments of the procedures being created/used in the TI wizard Advanced tabs:

DIMENSIONELEMENTINSERT('Simple Columns','',vColumn,'n');
CellPutN(vCellValue,'Simple Cube',vRow,vColumn);

And, you set the "Variable Type" (string, numeric, etc.) to pass the data type of the value the variable is holding to the procedure.

Hope I got all that right and it was helpful to anyone else that follows.

Thanks again to Alan, lotsaram, Wim, and gtonkin
User avatar
gtonkin
MVP
Posts: 1192
Joined: Thu May 06, 2010 3:03 pm
OLAP Product: TM1
Version: Latest and greatest
Excel Version: Office 365 64-bit
Location: JHB, South Africa
Contact:

Re: Creating Cube Generates "Cell type is string" error

Post by gtonkin »

Glad we could help and happy that you got there. I think you nailed it when you realized that the variable type relates to the type of data to be stored in the cell!
Post Reply