TI code for identifying unique new elements
-
- Posts: 2
- Joined: Wed Sep 07, 2011 4:37 pm
- OLAP Product: TM1
- Version: 9.52
- Excel Version: 2007
TI code for identifying unique new elements
I am trying to import a text file that contains multiple instances of Purchase order numbers. Before adding these to an existing dimension I want to create a text file that will show unique instances of the PO numbers that are not currently in the dimension. This file contains data that is not filtered for PO.
-
- MVP
- Posts: 3706
- Joined: Fri Mar 13, 2009 11:14 am
- OLAP Product: TableManager1
- Version: PA 2.0.x
- Excel Version: Office 365
- Location: Switzerland
Re: TI code for identifying unique new elements
1. Compare the PO number to the current PO dimension with DIMIX
2. If the PO does not currently exist insert it into a temporary dimension
3. Export the temporary dimension to a text file
3. Destroy the temporary dimension
2. If the PO does not currently exist insert it into a temporary dimension
3. Export the temporary dimension to a text file
3. Destroy the temporary dimension
- jim wood
- Site Admin
- Posts: 3961
- Joined: Wed May 14, 2008 1:51 pm
- OLAP Product: TM1
- Version: PA 2.0.7
- Excel Version: Office 365
- Location: 37 East 18th Street New York
- Contact:
Re: TI code for identifying unique new elements
Or you can create a holding cube. Store them comma delimited in the cube for reference. (Do this by checking if there is a value already there. If not just store the PO number. If there is read the current value, append a comma then the new PO number.) If you do this based on the date that it ran. (Add the date to a date dimension in the holding cube.) you can keep an easily accesable record of new PO numbers and when they hit.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
-
- Posts: 2
- Joined: Wed Sep 07, 2011 4:37 pm
- OLAP Product: TM1
- Version: 9.52
- Excel Version: 2007
Re: TI code for identifying unique new elements
Just to be sure I understand are you saying create a cube with a numbered dimension 1-10,000 and another dimension for holding PO number and import date?jim wood wrote:Or you can create a holding cube. Store them comma delimited in the cube for reference. (Do this by checking if there is a value already there. If not just store the PO number. If there is read the current value, append a comma then the new PO number.) If you do this based on the date that it ran. (Add the date to a date dimension in the holding cube.) you can keep an easily accesable record of new PO numbers and when they hit.
- jim wood
- Site Admin
- Posts: 3961
- Joined: Wed May 14, 2008 1:51 pm
- OLAP Product: TM1
- Version: PA 2.0.7
- Excel Version: Office 365
- Location: 37 East 18th Street New York
- Contact:
Re: TI code for identifying unique new elements
Apologies if I was a little vague.
Create a cube that has 2 dimensions: 1) Date. Just add one date to this. 2) A measure dimension that contains a text element.
In your dimension update process if you get a new element firstly insert the date in to the date dimension. Use Today(1) (Keeps the year to 2 digits) and dimension element insert for this. Also insert the data in a comma delimited format. The formula for this would look something like this:
I hope that helps,
Jim.
Create a cube that has 2 dimensions: 1) Date. Just add one date to this. 2) A measure dimension that contains a text element.
In your dimension update process if you get a new element firstly insert the date in to the date dimension. Use Today(1) (Keeps the year to 2 digits) and dimension element insert for this. Also insert the data in a comma delimited format. The formula for this would look something like this:
Code: Select all
IF(CellGetS('New Element Deposit',Today(1),'text') @= ''
,DimensionElementInsert('Deposit Date', 1, Today(1),'S')
,''
) ;
IF(CellGetS('New Element Deposit',Today(1),'text') @= ''
,CellPutS(element_variable,'New Element Deposit',Today(1),'text')
,CellPutS(CellGetS('New Element Deposit',Today(1),'text')|','|element_variable,'New Element Deposit',Today(1),'text')
) ;
Jim.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7