Hi All,
we have a requirement to Create/ zeroout the views,After zero outing we need to delete the Views
We have 14 dimension in the cube.
Here is the criteria to Zeroout.
We have Version dimension with different versions and year dimension starting the years with 2008 to 2013.
Version Dimension having elements: like Actuals,FY11 Actuals Archived,FY12 JanOL..etc
For the Actuals version => zero out all data that are NOT under 2013 year.
For all other versions => zero out all data that are NOT for the year that the version pertains too.
Some examples:
For ‘Forecast’ cube and version ‘Actuals’ zero out all data for prior years: 2009,2010,2011,2012.
For ‘Historical Forecast’ cube and version ‘FY11 Actuals Archived’ zero out all data for prior years: 2009,2010,2012
For ‘Historical Forecast’ cube and version ‘FY12 Actuals Archived’ zero out all data for prior years: 2009,2010,2011.
in the above example user can enter the ‘FY11 Actuals Archived’ version as parameter then TI has build the viewS for the below combination and view zero out.
Cubename Version Year
Historical Forecast FY11 Actuals Archived 2008
Historical Forecast FY11 Actuals Archived 2009
Historical Forecast FY11 Actuals Archived 2010
Historical Forecast FY11 Actuals Archived 2012
And also we need to have some calls to a small log with asciioutput(), nothing too fancy. A log with the date, username that executed, and what version and years that were zeroed out. A unique log filename for each run would be preferred.
I created TI process with attached script and working as expected.
We are passing Cubename,Version Dim name,Version element to be deleted as Parameters and we hard coded Years.
Based on the Version element parameter it is validating Year and inserting the year elements in the new year_subset.
But we are looking for Dynamic Year subset creation and view zero out and Log with dynamic subset year elements.
Please help us.
Thanks in Advance !!
Regards,
Sathish
View Zerout and Ascii out put for log
-
- Posts: 38
- Joined: Mon Dec 20, 2010 5:02 am
- OLAP Product: Cognos TM1
- Version: 9.4 and 9.5
- Excel Version: 2003 and 2007
View Zerout and Ascii out put for log
- Attachments
-
- View Zerout and Ascii out put for log.txt
- (4.37 KiB) Downloaded 281 times
-
- MVP
- Posts: 3241
- 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: View Zerout and Ascii out put for log
Hello
What is the difference with your previous topic:
http://www.tm1forum.com/viewtopic.php?f=3&t=8331
What is the difference with your previous topic:
http://www.tm1forum.com/viewtopic.php?f=3&t=8331
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
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
-
- Posts: 38
- Joined: Mon Dec 20, 2010 5:02 am
- OLAP Product: Cognos TM1
- Version: 9.4 and 9.5
- Excel Version: 2003 and 2007
Re: View Zerout and Ascii out put for log
Hi Wim,
Previous explains the requirement and this post explains my implementaion steps.
And i am asking some help on Dynamic subeset creation based on logic.
Let me know if i missed any thing/any info to provide further.
Regards,
Sathish
Previous explains the requirement and this post explains my implementaion steps.
And i am asking some help on Dynamic subeset creation based on logic.
Let me know if i missed any thing/any info to provide further.
Regards,
Sathish
-
- MVP
- Posts: 3241
- 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: View Zerout and Ascii out put for log
Here is example coding for your dynamic subset:
My dimension Years contains n-type elements Y2008, Y2009, Y2010, Y2011, Y2012, Y2013.
The result of the subset is all years, except Y2011.
You can tweak this in your TI process.
PS: Please use only 1 topic in the future since that would not clutter the forum. Thanks.
Code: Select all
pVersion = 'FY11 Actuals Archived';
SubsetCreateByMdx('test subset','{EXCEPT({TM1FILTERBYLEVEL( {TM1SUBSETALL( [Years] )}, 0)},{StrToMember("[Years].[Y20" + "' | Subst(pVersion,3,2) | '" + "]")} )}');
The result of the subset is all years, except Y2011.
You can tweak this in your TI process.
PS: Please use only 1 topic in the future since that would not clutter the forum. Thanks.
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
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
-
- MVP
- Posts: 3241
- 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: View Zerout and Ascii out put for log
Alternatively, you can use the code to have a dynamic subset with lowest-level elements:
{TM1FILTERBYLEVEL( {TM1SUBSETALL( [Years] )}, 0)}
followed by a SubsetElementDelete command to remove the year you do not want in the subset.
By the way, this will turn the dynamic subset into a static subset.
{TM1FILTERBYLEVEL( {TM1SUBSETALL( [Years] )}, 0)}
followed by a SubsetElementDelete command to remove the year you do not want in the subset.
By the way, this will turn the dynamic subset into a static subset.
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
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
-
- MVP
- Posts: 3241
- 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: View Zerout and Ascii out put for log
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
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
-
- Posts: 38
- Joined: Mon Dec 20, 2010 5:02 am
- OLAP Product: Cognos TM1
- Version: 9.4 and 9.5
- Excel Version: 2003 and 2007
Re: View Zerout and Ascii out put for log
Hi Wim,
I included the script for Version=Actuals as well.
Its working as expected.
Heartful Thanks to you for the help.
I am attaching the modified Script for your reference!!
Once again Thanks for the help.
Regards,
Sathish
I included the script for Version=Actuals as well.
Its working as expected.
Heartful Thanks to you for the help.
I am attaching the modified Script for your reference!!
Once again Thanks for the help.
Regards,
Sathish
- Attachments
-
- View Zerout and Ascii out put for log_Modified.txt
- (3.39 KiB) Downloaded 275 times
-
- Posts: 38
- Joined: Mon Dec 20, 2010 5:02 am
- OLAP Product: Cognos TM1
- Version: 9.4 and 9.5
- Excel Version: 2003 and 2007
Re: View Zerout and Ascii out put for log
Hi ,
I am using attached codes for Zero out the cube views,but i am unlucky to achieve the same.
Can you some one help me whether i am doing any mistake in the code or in any other.
Attachment1: code for only specified elements in the dimension and creating view with specified elements dimension and rest dimensions will have all the elements.
Attachment2: I checked by creating all dimensions at leaf level and trying to zero out,still no luck.
Regards,
Sathish
I am using attached codes for Zero out the cube views,but i am unlucky to achieve the same.
Can you some one help me whether i am doing any mistake in the code or in any other.
Attachment1: code for only specified elements in the dimension and creating view with specified elements dimension and rest dimensions will have all the elements.
Attachment2: I checked by creating all dimensions at leaf level and trying to zero out,still no luck.
Regards,
Sathish
- Attachments
-
- Attachement2-Leaf level subsets.txt
- (4.73 KiB) Downloaded 257 times
-
- Attachement1-Specified elements and view with all.txt
- (1.97 KiB) Downloaded 292 times