We are trying to create a generic cube exporter that essentially uses a fake cube to populate a bunch of variables generically named V1, V2, etc.
Using a while loop and TABDIM we can construct the Variables for each dimension related to a cube and then use Expand to convert the string to actual values.
While the solution is working the dimensions seem to come out of order. Everything is shifted by 1. If the first dimension of the cube was Months and the second was Versions we are seeing our string for expand built as "%V1%", "%V2%". However, V1 is evaluating to the Versions dimension. Anyone know why this would occur? We built a TI manually using the view and the variables show up in the order we would have expected. Only when we try to Expand our string do we see the values getting shifted.
Order of Dimensions in View and Expand Function
-
- Community Contributor
- Posts: 349
- Joined: Tue Aug 17, 2010 6:31 am
- OLAP Product: Planning Analytics
- Version: 2.0.5
- Excel Version: 2016
- 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: Order of Dimensions in View and Expand Function
Have you tried downloading and using the Bedrock processes? They're not a bad place to start,
Jim.
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
-
- 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: Order of Dimensions in View and Expand Function
Not sure how you are doing the export exactly but there have often been cases (in various versions of TM1) of generic export TIs having issues with re-ordered cubes. You can get around that (and I tend to put this in TIs now as an OCD force of habit) by cycling on tabdim and setting each dimension as a sequential order of row in your viewcreate statement.
e.g.
Not sure why you are using an extra cube for the export though, I've generally just used generic TIs.
e.g.
Code: Select all
iCount = 1;
sDim = TabDim ( sCub, iCount );
While ( sDim@<>'' );
ViewRowDimensionSet ( sCub, sView, sDim, iCount );
iCount = iCount + 1;
sDim = TabDim ( sCub, iCount );
End;
Declan Rodger
-
- Community Contributor
- Posts: 349
- Joined: Tue Aug 17, 2010 6:31 am
- OLAP Product: Planning Analytics
- Version: 2.0.5
- Excel Version: 2016
Re: Order of Dimensions in View and Expand Function
Thanks for the info..working on it now.
We aren't using an extra cube, just a generic cube that has 15 dimensions or so. This way the variables tab has enough variables in it to cover any cube we may export from the process.
We aren't using an extra cube, just a generic cube that has 15 dimensions or so. This way the variables tab has enough variables in it to cover any cube we may export from the process.
-
- Community Contributor
- Posts: 349
- Joined: Tue Aug 17, 2010 6:31 am
- OLAP Product: Planning Analytics
- Version: 2.0.5
- Excel Version: 2016
Re: Order of Dimensions in View and Expand Function
For some reason when we start the source view from the cube we want to export the columns come out in order. When we use a dummy cube and a while loop to assign variables V1-n the come out of order. It's behaving oddly when we switch the view from one cube to another.