Page 1 of 1

Asciioutput Data Export is not working

Posted: Wed Jan 08, 2020 6:56 pm
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

Re: Asciioutput Data Export is not working

Posted: Wed Jan 08, 2020 8:11 pm
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

Re: Asciioutput Data Export is not working

Posted: Thu Jan 09, 2020 3:12 pm
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

Re: Asciioutput Data Export is not working

Posted: Thu Jan 09, 2020 10:20 pm
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

Re: Asciioutput Data Export is not working

Posted: Sat Apr 10, 2021 8:53 pm
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.

Re: Asciioutput Data Export is not working

Posted: Sat Apr 10, 2021 9:00 pm
by Wim Gielis
Please do not post in multiple topics the same question.