Hi All,
I am exporting the data from View through TI process but i need the data in the below format.
Challenge1:I need to export the data for each scenario as separate export file. By default it is exporting all scenario elements.
Challenge 2: how can i display both Year and Month in same export file coming from same time dimension.
Sample Format:
Productcode;Year;Entity;Account;ProductType;Business;months;salesmeasure;Scenario;value
61755;CD;2011;A;OTHER;XYZ;Apr;PQR;version1;1
I am using ASCIIOUTPUT function for exporting the data.
Thanks,
shan
Exporting the data through TI process
-
- Posts: 20
- Joined: Tue Dec 27, 2011 3:31 pm
- OLAP Product: Cognos TM1
- Version: 9.5.1 and 9.5.2
- Excel Version: 2007 and 2010
-
- 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: Exporting the data through TI process
I gave you the link to the If() statement in the documentation in the last post of yours that I replied to. You can use an If() / ElseIf() block to do that. Use the Scenario variable as the comparison argument, and write to different output files via AsciiOutput depending on the value of the Scenario variable.Cognostm1.ibm wrote: I am exporting the data from View through TI process but i need the data in the below format.
Challenge1:I need to export the data for each scenario as separate export file. By default it is exporting all scenario elements.
Alternatively incorporate the Scenario into the first argument to the AsciiOutput statement (the file name) which will ensure that each file has a different name depending on the scenario that the data row relates to.
Ensure that you read through the TM1 Reference Guide's "Rules Functions" section, specifically the "Text Rules Functions" group, as well as Syntax For Formulas in the Developers' Guide. That will give you what you need to be able to dynamically create the string that you need to feed to AsciiOutput as the file name.
Please clarify. In the sample that you've provided you appear to have both a year and month time dimension, not a single time dimension.Cognostm1.ibm wrote: Challenge 2: how can i display both Year and Month in same export file coming from same time dimension.
Sample Format:
Productcode;Year;Entity;Account;ProductType;Business;months;salesmeasure;Scenario;value
61755;CD;2011;A;OTHER;XYZ;Apr;PQR;version1;1
"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.
-
- Posts: 20
- Joined: Tue Dec 27, 2011 3:31 pm
- OLAP Product: Cognos TM1
- Version: 9.5.1 and 9.5.2
- Excel Version: 2007 and 2010
Re: Exporting the data through TI process
Let me try.
Thank you Alan
Thank you Alan
-
- Posts: 20
- Joined: Tue Dec 27, 2011 3:31 pm
- OLAP Product: Cognos TM1
- Version: 9.5.1 and 9.5.2
- Excel Version: 2007 and 2010
Re: Exporting the data through TI process
Alan,
The output i need to generate should contain Year and Month. And both are from same dimension.
The output i need to generate should contain Year and Month. And both are from same dimension.
-
- 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: Exporting the data through TI process
So what you're saying is that you need to split up month and year so that they appear in separate fields as you have in your sample data?Cognostm1.ibm wrote: The output i need to generate should contain Year and Month. And both are from same dimension.
If the elements are in the correct format you can do that with the string manipulation functions that I referred to above. If you supply details of your dimension (what the names of the leaf elements are, the names of the consolidations and any aliases) and whether you're exporting at N or consolidated level I can be more specific.
"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.
-
- Posts: 20
- Joined: Tue Dec 27, 2011 3:31 pm
- OLAP Product: Cognos TM1
- Version: 9.5.1 and 9.5.2
- Excel Version: 2007 and 2010
Re: Exporting the data through TI process
Alan,
Please find the screenshot as an attachment.
Year at Consolidation level and Months in leaf level.
Please find the screenshot as an attachment.
Year at Consolidation level and Months in leaf level.
-
- 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: Exporting the data through TI process
That makes it easy.Cognostm1.ibm wrote:Alan,
Please find the screenshot as an attachment.
Year at Consolidation level and Months in leaf level.
Your variable will probably come in as whatever the name of the dimension is. Each variable value will be a string like '2011.01'. In the Data tab you can just use the SubSt function to get the year:
Code: Select all
s_Yr = SUBST(VariableName, 1, 4);
Code: Select all
s_Mth = ATTRS('DimensionName', VariableName, 'Month_Abbr');
After that you can export it as
Code: Select all
AsciiOutput (FileName, Productcode,s_Yr, Entity, Account, ProductType, Business, s_Mth, salesmeasure, Scenario, NumberToString(Value));
"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.
-
- Posts: 20
- Joined: Tue Dec 27, 2011 3:31 pm
- OLAP Product: Cognos TM1
- Version: 9.5.1 and 9.5.2
- Excel Version: 2007 and 2010
Re: Exporting the data through TI process
Alan,
Thank you So much!!!
Thank you So much!!!