Asciioutput Data Export is not working

Post Reply
dharav9
Posts: 72
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 »

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: 808
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 »

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: 72
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 »

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: 808
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 »

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
beek
Posts: 63
Joined: Wed Sep 14, 2011 3:10 am
OLAP Product: TM1
Version: PA 2.0
Excel Version: Office 365

Re: Asciioutput Data Export is not working

Post by beek »

Hi dharav9 ,
Have you found the answer to your problem? I seem to be facing the same problem with you. Not able to asciioutput from a cubeview. I can confirm no problem with the view, as I managed to open and see data from the architect. Then I try something, I tried to do asciioutput with other cubeview, and it works magically. The difference between the 2 cubes are the number of dimensions. The one which I'm having problem with, has way more dimensions in it.
Wim Gielis
MVP
Posts: 3117
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.0.9.18
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: Asciioutput Data Export is not working

Post by Wim Gielis »

Please do not post in multiple topics the same question.
Best regards,

Wim Gielis

IBM Champion 2024
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
Post Reply