Exporting Data in CSV file

Post Reply
AshokReddy
Posts: 12
Joined: Wed Jul 25, 2012 6:15 am
OLAP Product: Cognos TM1
Version: 9.4.1
Excel Version: 2003

Exporting Data in CSV file

Post by AshokReddy »

Hi ,

I am trying to export data from a cube and putting in a CSV file. To do this i am creating a view , In that view i need to export data for 2 measures.

When i am creating the View in the subset for measure dimension i am wrinting as below.

SubsetCreate('Measure',Subsetname);
SubsetElementInsert('Measure',Subsetname,monthlyvalue,1);

When view is creating it creates with monthlyvalue (measure),

when i am extracting the data into the file it is missing some data because for those elements monthlyvalue is 0 for other measure there is data but it is not exporing into the file.

Here when i am extracting i am skipping the data which is 0 by using viewextractskipzerosets(cube,view,1).

Any one can help on this.
MSidat
Community Contributor
Posts: 110
Joined: Thu Aug 26, 2010 7:41 am
OLAP Product: TM1, PA
Version: PAL 2.0.8
Excel Version: 2016
Location: North West England

Re: Exporting Data in CSV file

Post by MSidat »

The Ti is behaving as it should as you have not defined the second measure in your view.

If you need to export data from both measures you need to create a View with both measures i.e. add another line when creating a view like:

SubsetElementInsert('Measure',Subsetname,AnotherMeasure,2);

This will ensure your data source contains all rows of data where there is a value against either or both of the measures.
Always Open to Opportunities
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Exporting Data in CSV file

Post by David Usherwood »

Just to point out that you will then get the two values on different rows. A TM1 view delivers data a cell at a time, iterating round the other dimensions. I suspect that the OP wanted to output both values on the same row - and hit problems with zero suppression when one cell was zero and the other was not.
Post Reply