CellPutN doent put value in to the cube
CellPutN doent put value in to the cube
Hi,
I have 0s at some of the intersection and value at some.
I would like to put value 1 at the intersection where the value is 0 only because I would like to spread the value at the Consolidation after putting 1. I have created a VIEW and am using that view as my data source in TI process.
In data tab I am using CellPutN() to put 1, but that would put 1 at all the intersection and not only at 0s (that is also not working though)...
I am not sure what am I doing wrong here? I am using Dimension followed by element name. i.e. CellPutN(1, 'MyCube','Dim1','ele1','Dim2','ele2','Actual');
Is it true or I have to use variables specified in the variables tab (Note: I am ignoring those variables in the tab)?? Also do I have to map these varibles if I use them?
I know I am doing something wrong here but not sure what? I would really appreciate step by step instruction.
Thanks.
I have 0s at some of the intersection and value at some.
I would like to put value 1 at the intersection where the value is 0 only because I would like to spread the value at the Consolidation after putting 1. I have created a VIEW and am using that view as my data source in TI process.
In data tab I am using CellPutN() to put 1, but that would put 1 at all the intersection and not only at 0s (that is also not working though)...
I am not sure what am I doing wrong here? I am using Dimension followed by element name. i.e. CellPutN(1, 'MyCube','Dim1','ele1','Dim2','ele2','Actual');
Is it true or I have to use variables specified in the variables tab (Note: I am ignoring those variables in the tab)?? Also do I have to map these varibles if I use them?
I know I am doing something wrong here but not sure what? I would really appreciate step by step instruction.
Thanks.
- qml
- MVP
- Posts: 1094
- 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: CellPutN doent put value in to the cube
You're making a lot of mistakes here.
Firstly, your CellPutN should be used like that (without referencing dimension names):
CellPutN(1,'MyCube','ele1','ele2',...);
What you want to do is - create a source view that does NOT have the 'skip zero/blank values" option checked (but rule calcs and consolidations should be suppressed). This is your data source and for each row of the data source your data tab script is executed once.
On your Variables tab set everything to Other instead of Ignore.
Lastly, on your Data tab, put a CellPutN formula, using your variables from the Variables tab. Something like:
Firstly, your CellPutN should be used like that (without referencing dimension names):
CellPutN(1,'MyCube','ele1','ele2',...);
What you want to do is - create a source view that does NOT have the 'skip zero/blank values" option checked (but rule calcs and consolidations should be suppressed). This is your data source and for each row of the data source your data tab script is executed once.
On your Variables tab set everything to Other instead of Ignore.
Lastly, on your Data tab, put a CellPutN formula, using your variables from the Variables tab. Something like:
Code: Select all
# the below IF statement can be changed or left out, depending on your requirements - if you want to write 1's everywhere or only to the zero cells
IF (Value = 0);
CellPutN(1, 'MyCube', variable1, variable2,...);
ENDIF;
Kamil Arendt
-
- Site Admin
- Posts: 1454
- Joined: Wed May 28, 2008 9:09 am
Re: CellPutN doent put value in to the cube
Why not use the Repeat Leaves spreading command?
- qml
- MVP
- Posts: 1094
- 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: CellPutN doent put value in to the cube
I think JayM is trying to implement an approach suggested by lotsaram in one of the previous threads where you first put 1s on leaves and then execute a proportional spread in TI to get a desired total on the C level.
Kamil Arendt
Re: CellPutN doent put value in to the cube
qml wrote:You're making a lot of mistakes here.
Firstly, your CellPutN should be used like that (without referencing dimension names):
CellPutN(1,'MyCube','ele1','ele2',...);
What you want to do is - create a source view that does NOT have the 'skip zero/blank values" option checked (but rule calcs and consolidations should be suppressed). This is your data source and for each row of the data source your data tab script is executed once.
On your Variables tab set everything to Other instead of Ignore.
Lastly, on your Data tab, put a CellPutN formula, using your variables from the Variables tab. Something like:
Code: Select all
# the below IF statement can be changed or left out, depending on your requirements - if you want to write 1's everywhere or only to the zero cells IF (Value = 0); CellPutN(1, 'MyCube', variable1, variable2,...); ENDIF;
Thanks qml for the instructions.
I did exactly what you have mentioned above but still getting 0s and not the 1s. I am not sure what could I change or do in this case?
Any ideas?
Thanks
-
- MVP
- Posts: 2832
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: CellPutN doent put value in to the cube
There is no such function in TI, which is the method the OP is talking about.David Usherwood wrote:Why not use the Repeat Leaves spreading command?
-
- Posts: 40
- Joined: Mon Mar 01, 2010 2:53 pm
- OLAP Product: TM1
- Version: 9.5 9.5.1 9.5.2
- Excel Version: 2007
Re: CellPutN doent put value in to the cube
Hi,qml wrote:create a source view that does NOT have the 'skip zero/blank values" option checked (but rule calcs and consolidations should be suppressed).
Are you certain that your view DOES NOT have skip zero/blank values checked?
This is the source of many (many many many) TIs that "don't work". I've had a couple myself...
Hope this helps.
Cheers!
--
Claude-Sebastien Jean
Senior Consultant in Information Technology
Keyrus Canada
www.keyrus.ca
--
Claude-Sebastien Jean
Senior Consultant in Information Technology
Keyrus Canada
www.keyrus.ca
Re: CellPutN doent put value in to the cube
Any one has any Idea?
- qml
- MVP
- Posts: 1094
- 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: CellPutN doent put value in to the cube
Unless you actually decide to show us what you are doing, we can keep guessing for a long time.
My guess is - there's something wrong with your data source definition and Data tab is not being executed, because there are no rows of data to execute it for. You could check that with a simple ASCIIOUTPUT on your Data tab.
My guess is - there's something wrong with your data source definition and Data tab is not being executed, because there are no rows of data to execute it for. You could check that with a simple ASCIIOUTPUT on your Data tab.
Kamil Arendt
Re: CellPutN doent put value in to the cube
Yes I think you are right.qml wrote:Unless you actually decide to show us what you are doing, we can keep guessing for a long time.
My guess is - there's something wrong with your data source definition and Data tab is not being executed, because there are no rows of data to execute it for. You could check that with a simple ASCIIOUTPUT on your Data tab.
There is something wrong because even after removing CellPutN() and just using ASCIIOutput(), I got nothing written in my file. I am out of thoughts... I am trying since 3days and I am not able to solve this thing....what could be wrong withe data source?
I created new view.
1) Created new process and attached the view with skip zero/blank value uncheck.
2) Under Variables tab, used Other option for every variable including Value.
3) Under Data tab used CellPutN(1,'MyCube','Var1', 'Var2','Var3')--> Do I need to include Value variable in CellPutN????
4) Save and Run Process... gives me nothing....
Please let me know if I am doing anything wrong from above.....
Thanks
-
- MVP
- Posts: 3654
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: CellPutN doent put value in to the cube
I think it's on you to show that you have comprehended and thought about the ideas (plural) that you have been given. Yes you are clearly doing something wrong but unless you post the actual code no one can really help you.JayM wrote:Any one has any Idea?
Re: CellPutN doent put value in to the cube
I understand the fact but the only thing I am using or say writing in the TI process is CellPutN() Function in data tab as follows and nothing else.....lotsaram wrote: I think it's on you to show that you have comprehended and thought about the ideas (plural) that you have been given. Yes you are clearly doing something wrong but unless you post the actual code no one can really help you.
CellPutN(1, 'GL', 'Account', 'Company', 'V4', 'Measures');
Thats it.. I am not writing anything else then this line under data tab.... everything else is just a change in wizard as instructed above.......
Thanks....
-
- MVP
- Posts: 3654
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: CellPutN doent put value in to the cube
Have you followed any, and I mean ANY of the advice already listed?
1. Give you actual code
2. Do an ASCIIOutput on the data tab to test if your data source actually contains any records
3. Have another look at your CellPutN function. Unless you actually have an element called "Account" and an element called "Company" then why and how would you expect data to be populated anywhere?
1. Give you actual code
2. Do an ASCIIOutput on the data tab to test if your data source actually contains any records
3. Have another look at your CellPutN function. Unless you actually have an element called "Account" and an element called "Company" then why and how would you expect data to be populated anywhere?
-
- MVP
- Posts: 2832
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: CellPutN doent put value in to the cube
Did you ever stop to think that maybe your wizard selections aren't right? How could we possibly know without seeing those? Did you also know that the "wizard" actually puts code on those tabs for you. If we could see that then possibly someone could help you. How many times does someone who is providing free help to you have to ask for something that you should have provided in the first place?
- 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: CellPutN doent put value in to the cube
As Lotsa and Tomok have indicated you need to give the whole of the code. The easiest way of doing this would be to find the .pro file for the process in your data directory, then use the Upload Attachment tab that you'll see below the reply window to post it so that others can see what you're doing.JayM wrote:I understand the fact but the only thing I am using or say writing in the TI process is CellPutN() Function in data tab as follows and nothing else.....lotsaram wrote: I think it's on you to show that you have comprehended and thought about the ideas (plural) that you have been given. Yes you are clearly doing something wrong but unless you post the actual code no one can really help you.
CellPutN(1, 'GL', 'Account', 'Company', 'V4', 'Measures');
Thats it.. I am not writing anything else then this line under data tab.... everything else is just a change in wizard as instructed above.......
Thanks....
However I can tell you this already... because you have quotes around arguments like 'Account', 'Company', 'V4' and 'Measures', your data tab will be doing nothing but trying to repeatedly write the value 1 to a combination in the cube named "GL" where the first dimension's element name is Account, the second dimension's element name is "Company", the third dimension's element name is "V4" and so on. It will do this over and over for every row in your data source.
I suspect, from the V4 name, that everything aside from possibly the cube name is in fact supposed to be the name of a data source variable, which means that they should not have quote marks around them. By including quote marks, you're turning them into literal strings. That means that the CellPutN will always use (for example) "V4" as the element name rather than the value of the V4 variable from your data source.
"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.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Re: CellPutN doent put value in to the cube
lotsaram wrote:Have you followed any, and I mean ANY of the advice already listed?
1. Give you actual code
2. Do an ASCIIOutput on the data tab to test if your data source actually contains any records
3. Have another look at your CellPutN function. Unless you actually have an element called "Account" and an element called "Company" then why and how would you expect data to be populated anywhere?
Take a look at the Screen shots and tell me what am I doing wrong???tomok wrote:Did you ever stop to think that maybe your wizard selections aren't right? How could we possibly know without seeing those? Did you also know that the "wizard" actually puts code on those tabs for you. If we could see that then possibly someone could help you. How many times does someone who is providing free help to you have to ask for something that you should have provided in the first place?
Sir I thought this forum is meant to share the knowledge...and not being rude by mentioning Free Help....How many times does someone who is providing free help to you have to ask for something that you should have provided in the first place?
Anyways thanks for your "free" help...
- Attachments
-
- Screen shots.rar
- (466.11 KiB) Downloaded 278 times
- 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: CellPutN doent put value in to the cube
Nice attitude.JayM wrote: Take a look at the Screen shots and tell me what am I doing wrong???
Sir I thought this forum is meant to share the knowledge...and not being rude by mentioning Free Help....How many times does someone who is providing free help to you have to ask for something that you should have provided in the first place?
Anyways thanks for your "free" help...
Tomok was, in my opinion, quite correct in pointing out to you that people give of their own time to try to help others. I don't regard that as being rude at all. What's actually "rude" is when people take advantage of that by repeatedly, and I mean repeatedly, refusing to provide what they've been asked for to help solve the problem and in doing so effectively wasting the time of those who have tried to help them out.
As you have done, yet again.
In this case what have you provided? Screenshots in an uncommon archive format.
Others may look at them (if they have the software to unpack .rar archives; I don't on my work computer), but I think I for one will decline until or unless you supply what you've been asked for.
"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.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Re: CellPutN doent put value in to the cube
Sir, I am not showing any attitude or rudeness... what I meant to say was.. I am a beginner and trying to solve the problem since long.... I have always appreciated and provided what they have ask.....
I was unable to upload the file more then 512kbs and that the reason I put it in .rar...
Apologies, if anyone felt I was rude......
I was unable to upload the file more then 512kbs and that the reason I put it in .rar...
Apologies, if anyone felt I was rude......
Re: CellPutN doent put value in to the cube
I will upload .pro file soon for the same.......
- 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: CellPutN doent put value in to the cube
.Zip is a better option; it's more common. While people will often have software on their personal computers which can handle .rars and less common types, a lot of work computers are "locked down" to some extent. They also aren't always the most up to date ones.JayM wrote:Sir, I am not showing any attitude or rudeness... what I meant to say was.. I am a beginner and trying to solve the problem since long.... I have always appreciated and provided what they have ask.....
I was unable to upload the file more then 512kbs and that the reason I put it in .rar...
The .pro file should be a lot less than 512kbs, and will actually be more useful than the screenshots anyway since it will provide all of the details and code of the process.
"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.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.