Create parameter process using none datasource

Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

Create parameter process using none datasource

Post by Chita »

Dear all,

I need help here,
I want to create parameter in my Cube. so i want to copy value in one element to other element in the same dimension.
For example :
i create parameter P0=Budget 1
then P1 = Budget 2
I want the value in Budget 1 copied to Budget 2
But i didn't use any datasource
Anybody know how to create the rule ?

I'm still new using TM1

Thanks for any reply from you
Regards,
Chita
User avatar
qml
MVP
Posts: 1098
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: Create parameter process using none datasource

Post by qml »

I am struggling to understand what it is that you want to do. If you want to copy cube data from one dimension element to another, then it has been discussed many times. That Search box in the top right corner is your friend. Here is a decent thread on the subject - you can take inspiration from it.
Kamil Arendt
Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

Re: Create parameter process using none datasource

Post by Chita »

Dear all,

I need help here . I want to copy value in my cube, i need use TI process. In this case i have to use none datasource. can anybody help me how to create parameter and the formula in prolog tab and epilog tab ? i really" don't know how to make it

The value that i want to copy is the value in Element 'Budget 1' to 'Budget 2'
lotsaram
MVP
Posts: 3704
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Create parameter process using none datasource

Post by lotsaram »

Chita wrote:Dear all,

I need help here . I want to copy value in my cube, i need use TI process. In this case i have to use none datasource. can anybody help me how to create parameter and the formula in prolog tab and epilog tab ? i really" don't know how to make it

The value that i want to copy is the value in Element 'Budget 1' to 'Budget 2'
Quite simply no. If you are using TI and you want to copy data then you must have a data source, period.

But it seems you are quite confused as to what you want, do you want to copy the values with a rule or with TI? I suggest TI is the way to go since if you "copy" with a rule the data will always be dynamically linked and there doesn't seem much point to that since usually the reason for copying a version is to keep a record of what the value was at a point in the process.

Look at the link qml suggested and also look at the bedrock library, it has a pre-built TI to copy data from one element to another within a target dimension in any cube. This should do what you need.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

Re: Create parameter process using none datasource

Post by Chita »

i want copy the value using TI process.. do you know how to create process for copy value to many cube ? .. or some link for me to read ..

Thank you so much for your reply
Wim Gielis
MVP
Posts: 3240
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Create parameter process using none datasource

Post by Wim Gielis »

Chita wrote:i want copy the value using TI process.. do you know how to create process for copy value to many cube ? .. or some link for me to read ..
lotsaram wrote:Look at the link qml suggested and also look at the bedrock library, it has a pre-built TI to copy data from one element to another within a target dimension in any cube. This should do what you need.
There you go.
Best regards,

Wim Gielis

IBM Champion 2024-2025
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
Alan Kirk
Site Admin
Posts: 6667
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: Create parameter process using none datasource

Post by Alan Kirk »

Chita wrote:i want copy the value using TI process.. do you know how to create process for copy value to many cube ? .. or some link for me to read ..
A link... aside from the one that QML already gave you in his post? (The word "Here" is a hyperlink, you may have noticed.) Did you read that thread? Did you download the Bedrock code that Lotsaram posted in that thread?
"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.
Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

Re: Create parameter process using none datasource

Post by Chita »

Hai guys,

I need help here. I've made to copy the value but there's still a view error
this is the cube that i want to copy the value from budget 1 to budget 7

and this is the formula that i make in Turbo Integrator in tab prolog :

Code: Select all

#****Begin: Generated Statements***
#****End: Generated Statements****

#*******************************************************************************
# Delete the View and the Subset used to empty the targeted cells
#*******************************************************************************

IF
(VIEWEXISTS ('Input Accomodation and Transportation', 'Emptyview')=1);
VIEWDESTROY ('Input Accomodation and Transportation', 'Emptyview');
ENDIF;

IF
(SUBSETEXISTS ('Scenario', 'Emptysubset2')=1 );
SUBSETDESTROY ('Scenario', 'Emptysubset2');
ENDIF;

#*******************************************************************************
# Create the View and the Subset used to empty the targeted cells
#*******************************************************************************

VIEWCREATE ( 'Input Accomodation and Transportation', 'Emptyview' );
SUBSETCREATE ( 'Scenario', 'Emptysubset2');
SUBSETELEMENTINSERT ( 'Scenario', 'Emptysubset2', P1, 1);
VIEWSUBSETASSIGN ( 'Input Accomodation and Transportation', 'Emptyview', 'Scenario', 'Emptysubset2');

#*******************************************************************************
# Empty the targeted cells
#*******************************************************************************

VIEWZEROOUT ('Input Accomodation and Transportation', 'Emptyview');

#*******************************************************************************
# Create the View and the Subset used to empty the targeted cells
#*******************************************************************************

IF 
( VIEWEXISTS ('Input Accomodation and Transportation', 'Fromversion')=1 );
VIEWDESTROY ('Input Accomodation and Transportation', 'Fromversion');
ENDIF;

VIEWCREATE ('Input Accomodation and Transportation', 'Fromversion');

IF
(SUBSETEXISTS ('Scenario', 'Fromsubset2')=1 );
SUBSETDESTROY ('Scenario', 'Fromsubset2');
ENDIF;

#*******************************************************************************
# Create the View and the Subset used to empty the targeted cells
#*******************************************************************************

SUBSETCREATE ('Scenario', 'Fromsubset2' );

SUBSETELEMENTINSERT ('Scenario', 'Fromsubset2', P0, 1);

VIEWSUBSETASSIGN ('Input Accomodation and Transportation', 'Fromversion', 'Scenario', 'Fromsubset2');

-----------------------------------------------------------------------------------------------------------------------------------
And this is the formula that i make in tab data :

#*******************************************************************************
# Write targeted cells if updateable
#*******************************************************************************

IF

( CELLISUPDATEABLE ( 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure) =1 );
CELLPUTS(SValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure);
CELLPUTN(NValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure);

ENDIF;
-----------------------------------------------------------------------------------------------------------------------------------------------------


When i run the process the message log pop up like this picture bellow .

can you help me how to solve it ....


:cry:
Attachments
The Message Log File
The Message Log File
2.jpg (347.44 KiB) Viewed 13233 times
The cube name Input Accomodation and Transportation
The cube name Input Accomodation and Transportation
1.jpg (167.15 KiB) Viewed 13238 times
Last edited by Chita on Sat Jul 25, 2015 3:24 am, edited 1 time in total.
Alan Kirk
Site Admin
Posts: 6667
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: Create parameter process using none datasource

Post by Alan Kirk »

Chita wrote:Hai guys,

I need help here. I've made to copy the value but there's still a view error
this is the cube that i want to copy the value from budget 1 to budget 7
From the Request For Assistance Guidelines, which should be read thoroughly, with the relevant parts highlighted:
4) Similarly if you're getting unexpected results, specifics of what you're running, how, and what results you're getting will yield a more valuable response than "I'm running a T.I. but my code doesn't work properly". If you're getting an error, please be specific about what the error is (full details, not just "a runtime error" or "process terminated with errors"), and the circumstances under which it's occurring. But remember that even if you do specify the exact error message, it's not likely to be helpful unless you provide the context for it; which part of the software the error is occurring in (point 2 above), and what, specifically, you were doing at the time.

5) For Rules and TurboIntegrator processes, posting the actual code and the real names of and structures of your cubes, dimensions and elements will be a thousand times more useful than an attempted description of them. You don't need to post real data, but the real code is needed. Pseudo code is obviously not "the real code". When you post something like "Suppose I have cube A and Cube B, and my rule is ['value'] = N:DB('CubeA', 'dim1, dim2'" etc, then three things happen. One, you reduce the chance that a syntax or typing error will be spotted, which means wasting time bouncing posts back and forth to try to get to the root of the problem. Two, you are usually describing what you think is happening, which may not be what is happening. Three, some more experienced members won't even look at the question because they've had too much time wasted by the first two issues in the past. You can upload entire .pro, .cho or .rux files as attachments if necessary, or just copy and paste the relevant part into your post using the Code tag at the top of the post editing window.
"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.
Alan Kirk
Site Admin
Posts: 6667
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: Create parameter process using none datasource

Post by Alan Kirk »

Chita wrote:Hai guys,

I need help here. I've made to copy the value but there's still a view error
this is the cube that i want to copy the value from budget 1 to budget 7

and this is the formula that i make in Turbo Integrator in tab prolog :
OK, based on the code that you've now added to your edited post you appear to be well and truly on the right track. I think that your problem is here, in the code on your data tab:

Chita wrote:

Code: Select all

And this is the formula that i make in tab data :

#*******************************************************************************
# Write targeted cells if updateable
#*******************************************************************************

IF

( CELLISUPDATEABLE ( 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure) =1 );
CELLPUTS(SValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure);
CELLPUTN(NValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure);

ENDIF;
As per the screenshot that you posted (and for the benefit of those reading this in the e-mail notification feed), you're getting "Cell Type Is String" errors.

Here's the problem. You're testing whether the cell is updateable, which is fine. However that's just a test to determine whether all of the elements are at N level and not defined by rules. If the cell passes that test then you are trying to write both a string, and a numeric value to that cell. One or the other of those is going to be wrong. What you therefore do (assuming that the measures in both cubes are the same) is to test the value of the VALUE_IS_STRING TI Variable. (See the link for the syntax.) If VALUE_IS_STRING returns a non-zero value then you use the CellPutS function. If it returns zero then you use the CellPutN function. You don't use both of them as the code block above does, because if you do one of them will be wrong and will throw the type of error that you've shown.
"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.
Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

Re: Create parameter process using none datasource

Post by Chita »

Thank you for your reply,

i've changed my formula in tab data :

#*******************************************************************************
# Write targeted cells if updateable
#*******************************************************************************

IF

( VALUE_IS_STRING =1,
CELLPUTS(SValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure),
CELLPUTN(NValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure));

the messaoge log doesn't show like before but it's changed like this picture bellow. Is that okay to keep the message log like that cause i dont understand how to fix it..
Attachments
3.jpg
3.jpg (369.57 KiB) Viewed 13186 times
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Create parameter process using none datasource

Post by declanr »

The 5 column of data in all the lines I can see of the error file has "Total" in the element name so I assume it is a consolidated cell; and you are trying to move a value from a consolidated cell in Budget 1 to a consolidated cell in Budget 2; the error "Rule Applies to Cell" will appear if you try and put a value in either a rule calculated cell or consolidated cell (essentially a consolidated cell is a rule derived cell).

Based on what you are trying to do with your TI, I would imagine that you should be perfectly fine just setting the source view to skip consolidations. That would result in those lines of data not being processed.
Declan Rodger
Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

Re: Create parameter process using none datasource

Post by Chita »

Thank you for your reply,

But Total in my coloumn wasn't consolidate. That's the coloumn that has rule in my view. So do you mean i've to changed my view, right ?
then what about this .. i've to copy value in my cube that all the coloumn has the value by rule.. which is in this situation i can't change my view by hiden the coloumn that has rule.. right ?
Alan Kirk
Site Admin
Posts: 6667
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: Create parameter process using none datasource

Post by Alan Kirk »

Chita wrote:Thank you for your reply,

But Total in my coloumn wasn't consolidate. That's the coloumn that has rule in my view. So do you mean i've to changed my view, right ?
then what about this .. i've to copy value in my cube that all the coloumn has the value by rule.. which is in this situation i can't change my view by hiden the coloumn that has rule.. right ?
You have three alternatives:
  • One is to reinstate the cellsupdateable test that you took out with your last code update (that is to say, you use both the CellIsUpdateable and the VALUE_IS_STRING test). Or
  • Two is that you set the source view to skip rule calculated values (if doing that in code, you use the viewextractskiprulevaluesset function. Or
  • Three is that you modify the rules in your target version to make those cells not calculated by rules so that you can copy the calculated numbers into them.
"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.
Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

Re: Create parameter process using none datasource

Post by Chita »

#*******************************************************************************
# Write targeted cells if updateable
#*******************************************************************************


ViewExtractSkipRuleValuesSet('Input Accomodation and Transportation', 'View 1', 0);

IF
( VALUE_IS_STRING =1,
CELLPUTS(SValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure),
CELLPUTN(NValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure));

----------------------------------------------------------------------------------------------------------------------------------------------------------

I've make like this but the message log still pop up like before. Any advice ? ... I'm stuck :cry:
BariAbdul
Regular Participant
Posts: 424
Joined: Sat Mar 10, 2012 1:03 pm
OLAP Product: IBM TM1, Planning Analytics, P
Version: PAW 2.0.8
Excel Version: 2019

Re: Create parameter process using none datasource

Post by BariAbdul »

Code: Select all

IF
( VALUE_IS_STRING =1,
CELLPUTS(SValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure),
CELLPUTN(NValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure));
I don't see 'ELSE' in your IF statement.Try this:

Code: Select all

IF
  ( VALUE_IS_STRING =1);
  CELLPUTS(SValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber,  vMeasure);
ELSE;
   CELLPUTN(NValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber,    vMeasure);
ENDIF;

Thanks
"You Never Fail Until You Stop Trying......"
Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

Re: Create parameter process using none datasource

Post by Chita »

Thank you for your reply,

But i still have message log "Rule applies to cell"..
i've make Function ViewExtractSkipRuleValuesSet but it doesn't work ...... :?

Please any advice ???
Alan Kirk
Site Admin
Posts: 6667
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: Create parameter process using none datasource

Post by Alan Kirk »

BariAbdul wrote:I don't see 'ELSE' in your IF statement.
It isn't needed. There are two different syntaxes for If. One is the one liner as used in Rules, but also applicable to TI. If the conditional test is True, execute the first option, if it's False, execute the second option.

The second one is the If / ElseIf / Else / Endif syntax which must be used if there are multiple conditions or multiple lines of code to be executed.

This will generate a text file with True in it.

Code: Select all

If ( 1<2, AsciiOutput('F:\Temp\Test.txt', 'True'), AsciiOutput('F:\Temp\Test.txt', 'False') );
This will generate a text file with False in it:

Code: Select all

If ( 1>2, AsciiOutput('F:\Temp\Test.txt', 'True'), AsciiOutput('F:\Temp\Test.txt', 'False') );
No Else needed.
Chita wrote:But i still have message log "Rule applies to cell"..
i've make Function ViewExtractSkipRuleValuesSet but it doesn't work ...... :?
You need to either do this all one way or all the other way. If you're going to use that function then you should do the lot in the Prolog. That is, create the subsets, assign the elements to the subsets, create the view, assign the subsets to the view, assign the ViewExtractSkip function values, assign the view as the process data source. Are you doing that, or are you simply using a pre-existing view as your data source and trying to play around with it in your prolog? Because if you're doing the latter you would be better off just fixing the view that you're using and then leaving it alone in the Prolog.

Also, as an alternative did you try restoring the CellIsUpdateable test? Because it isn't there in your code.
"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.
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Create parameter process using none datasource

Post by declanr »

BariAbdul wrote:

Code: Select all

IF
( VALUE_IS_STRING =1,
CELLPUTS(SValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure),
CELLPUTN(NValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure));
I don't see 'ELSE' in your IF statement.Try this:

Code: Select all

IF
  ( VALUE_IS_STRING =1);
  CELLPUTS(SValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber,  vMeasure);
ELSE;
   CELLPUTN(NValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber,    vMeasure);
ENDIF;

Thanks
The If, ElseIf, EndIf is the more common approach used in TI but the syntax Chita was already using works also.
Chita wrote: ViewExtractSkipRuleValuesSet('Input Accomodation and Transportation', 'View 1', 0);
The View Extract Skip... functions use a 1 to specify something should be skipped and a 0 to specify it shouldn't; change the 0 in your code to a 1.
Declan Rodger
Chita
Posts: 16
Joined: Tue Jun 02, 2015 5:46 am
OLAP Product: Oracle
Version: 10.2.1
Excel Version: 2007

Re: Create parameter process using none datasource

Post by Chita »

When i make this rule in my view which is the numeric value :

IF

( CELLISUPDATEABLE ( 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure) =1 );
CELLPUTN(NValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure);

ENDIF;

The process running succesfully in rule coloumn but not when i use this :

IF

( VALUE_IS_STRING =1 );
CELLPUTS(SValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure);
ELSE;
CELLPUTN(NValue, 'Input Accomodation and Transportation', vYear, vOrganizationUnit,P1, vNumber, vMeasure);

ENDIF;

The message :
Error "Rule applies to cell"

Which part of my tab data rule that should i fix .. ????
Post Reply