Planning Analytics

Planning Analytics

Get AI-infused integrated business planning

 View Only
  • 1.  Storing string values created using rules in a cube

    Posted Mon September 23, 2019 03:22 PM
    Edited by System Admin Fri January 20, 2023 04:39 PM
    I am trying to store cost drivers as strings in a cube. I have a separate cube that derives the cost.

    I wanted to store, in this Cost Driver cube, a list of strings that, based upon rules, evaluate the cost driver (i.e., what primarily influences the cost).

    I have previously been able to store strings in cubes, by entering them manually. I understand that the last dimension has to contain the string based member. In this case, I have one named Value whose property I have set to be string.

    This time I am trying to create and store the string using a calculation (or rule). Finally, I tried to test with a simple rule such as below.

    ['Value'] = 'Test';

    I get an error message  that only says "invalid statement".

    What am I doing wrong? How do I store values of strings as above, using rules? Note that, even in the above case, I can enter a string into the cube, manually, by entering the value into the cell in a cube view.

    I also tried 

    ['Value'] = STR(0);

    as a test. This time the error is "missing colon".

    I honestly feel I am missing a colon at this point :)

    Any help much appreciated!

    EDITED: 

    I am now moving to a different implementation where the Cost Drivers will be a list of members in a dimension, and I will use a value of 1 or 0 in the Cost Driver cube to indicate whether that particular driver is applicable to that dimension member and that cost metric. I know this will work - in retrospect, it may actually be a better implementation, but I would still like to know what I am doing wrong in my earlier approach in storing strings as values of cells in a cube.
    ------------------------------
    Shubho Ghosal
    ------------------------------
    #PlanningAnalyticswithWatson


  • 2.  RE: Storing string values created using rules in a cube

    Posted Tue September 24, 2019 02:05 AM
    String rules must use the 'S' operator

    ['MyElement'] =S: 'test' ;





  • 3.  RE: Storing string values created using rules in a cube

    Posted Tue September 24, 2019 10:04 AM
    Ryan, Thanks for that.

    @Trish Smith, FYI - I did not see this in the TM1 Reference under Rules functions in the online reference - it may be hidden somewhere in some other documentation, but not covered under the TM1 Reference. Apologies if I missed it.


    ------------------------------
    Shubho Ghosal
    ------------------------------



  • 4.  RE: Storing string values created using rules in a cube

    Posted Tue September 24, 2019 10:29 AM
    ​Try

    ['Value'] =S: 'Test' ;

    I always qualify my rules with N, C, or S.

    ------------------------------
    Gary Smith
    ------------------------------



  • 5.  RE: Storing string values created using rules in a cube

    Posted Tue September 24, 2019 11:10 AM
    Edited by System Admin Fri January 20, 2023 04:37 PM
    Gary, thanks - yes, that works. It's a good idea to specify the rule type using S, C or N. I will remember that for the future.

    Trish, I see that this was covered in the guide that you referenced. I missed that one - apologies - I am all set.

    Just one additional point that may be relevant to making it easier for newbies.

    I have read the TM1 Rules guide you referenced a while ago, and it made it possible for me to get started.

    I have been using the TM1 Reference Guide ever since to get quick access to the rules functions (or Ti functions)  I need.

    Some of this content is not there - maybe because these are not strictly rules "functions".

    One example is the need to specify the S: (Value = S: 'String') when storing strings.

    Another was the String Concatenation (Pipe) character.

    I now realize that I need to go to both the documents to get the information I want - and I am going through the Rules guide one more time - I see it has a lot of valuable information in it.

    I think that, if the TM1 Reference Guide also had the additional constructs needed for implementing rules, in additional to the listing of functions - e.g., having the concatenation (pipe) operator mentioned under Text Variables, and the S: mentioned under a Assignment Operators (or however it should be named) section, it would be a more comprehensive document.

    That being said, reading both docs does work and I am fine with that for the time being.

    ------------------------------
    Shubho Ghosal
    ------------------------------