Asciioutput Data Export is not working

Post Reply
dharav9
Posts: 52
Joined: Wed Aug 15, 2018 3:18 pm
OLAP Product: TM1
Version: 10.3
Excel Version: 2016

Asciioutput Data Export is not working

Post by dharav9 » Wed Jan 08, 2020 6:56 pm

Hi, All
I just tried to export the data in asciioutput from the view created through SUBSET HAVING MDX BASED ON CUBE Values (sMDX - See below). I am not able to export data either manually (right click on view and export - it generates unknown error) or through TI (it does not generate output. When i open the view then i do able to see the value as it supposed to be. I even tried to put viewconstruct in prolog before extracting data but no luck.

When we use MDX filter based on cube values, do we need to consider anything else before exporting it out?

Code:

Code: Select all

IF (SubsetExists(DimEmp,sSub)=1);
SubsetDestroy(DimEmp,sSub);
ENDIF;
sMDX=
'{FILTER({TM1FILTERBYLEVEL( {TM1SUBSETALL( ['|DimEmp|'] )}, 0)},
(
(['|cubPlanEmp|'].(['|DimEmp|'].CurrentMember,['|DimMsr|'].[FTE]) = 0)
AND
(
(['|cubPlanEmp|'].(['|DimEmp|'].CurrentMember,['|DimMsr|'].[BonusRate]) > 0)
OR
(['|cubPlanEmp|'].(['|DimEmp|'].CurrentMember,['|DimMsr|'].[Action]) <>"")
)
)
)}';
SubsetCreateByMDX(sSub,sMDX,DimEmp,0);
# View Subset Assign
ViewSubsetAssign(cubPlanEmp, cubView, DimCat,sSub);
ViewSubsetAssign(cubPlanEmp, cubView, DimCo,sSub);
ViewSubsetAssign(cubPlanEmp, cubView, DimDept,sSub);
ViewSubsetAssign(cubPlanEmp, cubView, DimDiv,sSub);
ViewSubsetAssign(cubPlanEmp, cubView, DimEmp,sSub);

#====Above code successfully creates view as i needed.
DATASOURCECUBEVIEW = cubView;
Header=1;

sFile = 'G:\Test.csv';

#Data
IF (Header=1);
AsciiOutPut(sFile,'Category','Company','Department','Division','Employee','Measure','Value');
Header = 2;
ENDIF;

ASCIIOUTPUT(sFile, vCat,vCo, vDept,vDiv,vEmp,vMsr,vValue);
can you please share your insight on concept if i am missing something?

Thank You
Dharav

User avatar
paulsimon
MVP
Posts: 739
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Asciioutput Data Export is not working

Post by paulsimon » Wed Jan 08, 2020 8:11 pm

Hi

Are you outputting text values rather than numerics? I am guessing that you are since you don't have any conversion on the asciioutput

There is unfortunately a known bug when exporting text from an MDX View which IBM are going to fix soon. However, your case is not quite the same as you are using a native view, albeit with a fairly complex MDX statement on one subset, which as it is filtering on a cube is effectively using a sub MDX view. The problem might therefore be related.

When exporting a view either using Export as Text or via a TI process. The View is read in a different way. It is read as an Extract View rather than as a Display View. I cannot tell if you have any ViewExtractSkip statements. If you have, make sure that these are set correctly. Eg a common problem is skipping consols when the data source has a consol.

Am I correct in understanding that when you open the view that was created in a Perspectives Cube Viewer that you are seeing data?

Regards

Paul

dharav9
Posts: 52
Joined: Wed Aug 15, 2018 3:18 pm
OLAP Product: TM1
Version: 10.3
Excel Version: 2016

Re: Asciioutput Data Export is not working

Post by dharav9 » Thu Jan 09, 2020 3:12 pm

Hi, Paul


Am I correct in understanding that when you open the view that was created in a Perspectives Cube Viewer that you are seeing data?
I created that view through TI process. View has been created with MDX statement on employee dimension. Basically, this MDX statement pulls the employee id having FTE >0 from cube A. When i manually open view created by TI process, i do see all expected data. At this point, my view is correct. Now when i am trying to export data from this view (where data set contains only leaf level intersection and data input (not rule driven) values), my process runs successfully but no asciioutput files creates.
There is unfortunately a known bug when exporting text from an MDX View which IBM are going to fix soon.
Just for my understanding: above statement means if cube view create with MDX statement? or View contains subset with MDX statements?

I open the PMR with IBM. I will update you all as soon as i hear from them.

Thank You
Dharav

User avatar
paulsimon
MVP
Posts: 739
Joined: Sat Sep 03, 2011 11:10 pm
OLAP Product: TM1
Version: PA 2.0.5
Excel Version: 2016
Contact:

Re: Asciioutput Data Export is not working

Post by paulsimon » Thu Jan 09, 2020 10:20 pm

Hi

You only quoted part of my answer. If you read my full answer then that will answer your question.

"There is unfortunately a known bug when exporting text from an MDX View which IBM are going to fix soon. However, your case is not quite the same as you are using a native view, albeit with a fairly complex MDX statement on one subset, which as it is filtering on a cube is effectively using a sub MDX view. The problem might therefore be related."

Have you also looked at the other suggestion around ViewExtractSkip settings that I made and someone else made on a different thread.

Regards

Paul

Post Reply