TM1-How to send a cube view data to a csv file usign TI

Post Reply
shivangi
Posts: 11
Joined: Wed Aug 13, 2014 8:35 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

TM1-How to send a cube view data to a csv file usign TI

Post by shivangi »

Hello, i want to extratc my cube view to a csv file, m using ascii output but the values for the elements are not going correct.can anyone please show me how to do it ? :?:
Alan Kirk
Site Admin
Posts: 6647
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: TM1-How to send a cube view data to a csv file usign TI

Post by Alan Kirk »

shivangi wrote:Hello, i want to extratc my cube view to a csv file, m using ascii output but the values for the elements are not going correct.can anyone please show me how to do it ? :?:
Please refer to the Request For Assistance Guidelines:
4) Similarly if you're getting unexpected results, specifics of what you're running, how, and what results you're getting will yield a more valuable response than "I'm running a T.I. but my code doesn't work properly". If you're getting an error, please be specific about what the error is (full details, not just "a runtime error" or "process terminated with errors"), and the circumstances under which it's occurring. But remember that even if you do specify the exact error message, it's not likely to be helpful unless you provide the context for it; which part of the software the error is occurring in (point 2 above), and what, specifically, you were doing at the time. For Rules and TurboIntegrator processes, remember that including the actual code in your post will be a thousand times more useful than an attempted description of it. You can upload entire .pro and .cho files as attachments if necessary, or just copy and paste the relevant part into your post using the Code tag at the top of the post editing window.
In this case you should also provide details of how you've constructed the cube view that you're using as your data source.

NB: The post was moved to the correct forum. It did not belong in Commercial.
"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.
BariAbdul
Regular Participant
Posts: 424
Joined: Sat Mar 10, 2012 1:03 pm
OLAP Product: IBM TM1, Planning Analytics, P
Version: PAW 2.0.8
Excel Version: 2019

Re: TM1-How to send a cube view data to a csv file usign TI

Post by BariAbdul »

"You Never Fail Until You Stop Trying......"
shivangi
Posts: 11
Joined: Wed Aug 13, 2014 8:35 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

Re: TM1-How to send a cube view data to a csv file usign TI

Post by shivangi »

BariAbdul wrote:This might help:
http://www.tm1forum.com/viewtopic.php?f=3&t=3415 Thanks
Thanks a lot ! :)
shivangi
Posts: 11
Joined: Wed Aug 13, 2014 8:35 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

Re: TM1-How to send a cube view data to a csv file usign TI

Post by shivangi »

How can i set my dimesnions in cols and rows in a ti ? though my view shows my 4 dims in cols and measure in a row, i want to that every measure element must become a column rather than appearing together in a measure column ? how can i acheive this?
tomok
MVP
Posts: 2836
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: TM1-How to send a cube view data to a csv file usign TI

Post by tomok »

shivangi wrote:How can i set my dimesnions in cols and rows in a ti ? though my view shows my 4 dims in cols and measure in a row, i want to that every measure element must become a column rather than appearing together in a measure column ? how can i acheive this?
You can't. Processing a view in a TI is going to read the dimensions in the order they appear in the cube. You can, however, control the order of the elements in the dimensions themselves via subset definition. For example, let;s say you have a cube with three dimensions and a measure dimension and each dimension has 3 elements. Here's the order of elements when you process the view:

Dim_1_Element_1,Dim_2_Element_1,Dim_3_Element_1, Measure_1
Dim_1_Element_1,Dim_2_Element_1,Dim_3_Element_1, Measure_2
Dim_1_Element_1,Dim_2_Element_1,Dim_3_Element_1, Measure_3
Dim_1_Element_1,Dim_2_Element_1,Dim_3_Element_2, Measure_1
Dim_1_Element_1,Dim_2_Element_1,Dim_3_Element_2, Measure_2
Dim_1_Element_1,Dim_2_Element_1,Dim_3_Element_2, Measure_3
Dim_1_Element_1,Dim_2_Element_1,Dim_3_Element_3, Measure_1
.....
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
shivangi
Posts: 11
Joined: Wed Aug 13, 2014 8:35 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

Re: TM1-How to send a cube view data to a csv file usign TI

Post by shivangi »

cant i make something like this ? here if u see in the attached file, my views measure each of them comes as a diff col in sql table against the dims.
Alan Kirk
Site Admin
Posts: 6647
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: TM1-How to send a cube view data to a csv file usign TI

Post by Alan Kirk »

shivangi wrote:cant i make something like this ? here if u see in the attached file, my views measure each of them comes as a diff col in sql table against the dims.
Your post is missing the attachment. It may be that you clicked the [Browse] button to select the file, but you then have to click the [Add the file] button to the right of that to add the file to your post.
Attachment.jpg
Attachment.jpg (134.6 KiB) Viewed 10905 times
"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.
shivangi
Posts: 11
Joined: Wed Aug 13, 2014 8:35 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

Re: TM1-How to send a cube view data to a csv file usign TI

Post by shivangi »

sorry, done now.
Attachments
cube view img
cube view img
ti2.jpg (290.82 KiB) Viewed 10903 times
table structure
table structure
ti1.jpg (281.7 KiB) Viewed 10903 times
shivangi
Posts: 11
Joined: Wed Aug 13, 2014 8:35 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

Re: TM1-How to send a cube view data to a csv file usign TI

Post by shivangi »

Hello all,

Any suggestions ?
tomok
MVP
Posts: 2836
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: TM1-How to send a cube view data to a csv file usign TI

Post by tomok »

You can't do what you want without some special coding. This is because when you use a cube view as a data source you get one intersection per record. Your picture shows 5 intersections (the 5 columns). The only way to output these 5 columns in one line in the CSV is going to be to pull one column from the view and then do a CellGetN for all the remaining columns and then configure your ASCIIOutput statement to output the dimension elements and then the 5 measures. You'll also want to create a consolidation of the measures you want and use that in the view. Then you can CellGetN for each of the children of that consolidation and write them out to your file.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
shivangi
Posts: 11
Joined: Wed Aug 13, 2014 8:35 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

Re: TM1-How to send a cube view data to a csv file usign TI

Post by shivangi »

tomok wrote:You can't do what you want without some special coding. This is because when you use a cube view as a data source you get one intersection per record. Your picture shows 5 intersections (the 5 columns). The only way to output these 5 columns in one line in the CSV is going to be to pull one column from the view and then do a CellGetN for all the remaining columns and then configure your ASCIIOutput statement to output the dimension elements and then the 5 measures. You'll also want to create a consolidation of the measures you want and use that in the view. Then you can CellGetN for each of the children of that consolidation and write them out to your file.
Hey, can u pls tell me or write the syntax and show me.I am pretty new to TM1, so i dont really have much knowledge about coding. :(
lotsaram
MVP
Posts: 3701
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: TM1-How to send a cube view data to a csv file usign TI

Post by lotsaram »

shivangi wrote:Hey, can u pls tell me or write the syntax and show me.I am pretty new to TM1, so i dont really have much knowledge about coding. :(
That is not how this works. No one is here to do your job for you. Alan has already directed you to the Request For Assistance Guidelines once already. Please follow the link and read for comprehension. Show evidence of what you have done already to tackle the problem, provide the code that you have, then maybe someone will offer a tip on improving it.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: TM1-How to send a cube view data to a csv file usign TI

Post by rmackenzie »

lotsaram wrote:
shivangi wrote:Hey, can u pls tell me or write the syntax and show me.I am pretty new to TM1, so i dont really have much knowledge about coding. :(
That is not how this works. No one is here to do your job for you.
Shivangi,

Just to make it clear why you are getting a negative response: the code you are asking for isn't a couple of lines long, nor is it information someone can give you a quick example on a special TI function.

The code you need would be reasonably complex and be dependent on how the data is stored in your cube and the types of hierarchies you have in the specific dimensions of that cube. If for example, you were willing to pay for someone to do this job for you, they could easily quote you a full days work to develop and test this particular script. How much does that normally cost your company?

Even people who have done these sort of scripts before can't just hand you an old script they might have as normally they are quite cube-specific and the old script would probably need so much re-writing that it would be easier to start at the beginning. This is what tomok means by 'special coding' - not that it is 'expert coding' - but that it requires thought, effort and time to test.

Robin
Robin Mackenzie
shivangi
Posts: 11
Joined: Wed Aug 13, 2014 8:35 am
OLAP Product: TM1
Version: 10.1.1
Excel Version: 2010

Re: TM1-How to send a cube view data to a csv file usign TI

Post by shivangi »

lotsaram wrote:
shivangi wrote:Hey, can u pls tell me or write the syntax and show me.I am pretty new to TM1, so i dont really have much knowledge about coding. :(
That is not how this works. No one is here to do your job for you. Alan has already directed you to the Request For Assistance Guidelines once already. Please follow the link and read for comprehension. Show evidence of what you have done already to tackle the problem, provide the code that you have, then maybe someone will offer a tip on improving it.
Hey, i had just posted above the image , i was little confused, i m not asking you all do work on it only, i was just askign for a suggestion caus i have already taken my data out to a sql table so i just wanted to knw how can i get my cols in such a way , which when some one posted i just wanted to knw it caus i m pretty new to tm1,Anyways its ok , thanks for the time spent.
uchow10
Posts: 18
Joined: Mon Aug 05, 2013 9:25 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Re: TM1-How to send a cube view data to a csv file usign TI

Post by uchow10 »

shivangi wrote:How can i set my dimesnions in cols and rows in a ti ? though my view shows my 4 dims in cols and measure in a row, i want to that every measure element must become a column rather than appearing together in a measure column ? how can i acheive this?
If you already have the cubeview setup the way you want, i.e. dimensions in cols and measure on the row why not just do a snapshot to Excel? You can then in Excel format it and then save it as a .csv file assuming the view is not monstrously large...

of course if this is too much manual work then you will have to do special coding which as the others mention is not a simple few lines of code
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: TM1-How to send a cube view data to a csv file usign TI

Post by rmackenzie »

Similar discussion here.
Robin Mackenzie
Post Reply