Re: Export Cube data in CSV file, with all Months as columns
Posted: Mon Mar 27, 2017 5:44 am
Recently I encountered a similar scenario ........
say a dimension name MEASURE
A (parent)
----- B (child1)
----- C (child2)
A = B -C
while exporting the data to csv file for all PRODUCT dimension elements.... I selected the top level of dim MEASURE (ie element A)
but the records for the PRODUCT elements having value for MEASURE B & C got excluded from the source view as I used the following code -
ViewExtractSkipCalcsSet (CubeName, ViewName, 0);
ViewExtractSkipZeroesSet (CubeName, ViewName, 1);
ViewExtractSkipRuleValuesSet(CubeName, ViewName, 0);
can't ignore ZERO SUPPRESS as cube/view size is already very heavy.....
Output file doesnt have records for those PRODUCT elements where B = C (MEASURE DImension)
I want all those PRODUCT elements to be in output csv file, which have data for MEASURE B and C.
===== PROLOG TAB =====
Creating source view
suppose Cube has 5 dimensions - COUNTRY, PRODUCT, YEAR, MONTH, MEASURE
while creating source view I selected the following (using SubsetCreate & SubsetElementInserrt functions ) -
COUNTRY - Country (top level)
PRODUCT - all leaf level elements using MDX Query
YEAR - pYear ( from parameter)
MONTH - pMonth (from parameter)
MEASURE - A (top level)
what could be the alternative approach, to get the desired result. (ie. All PRODUCT elements having non Zero values)
say a dimension name MEASURE
A (parent)
----- B (child1)
----- C (child2)
A = B -C
while exporting the data to csv file for all PRODUCT dimension elements.... I selected the top level of dim MEASURE (ie element A)
but the records for the PRODUCT elements having value for MEASURE B & C got excluded from the source view as I used the following code -
ViewExtractSkipCalcsSet (CubeName, ViewName, 0);
ViewExtractSkipZeroesSet (CubeName, ViewName, 1);
ViewExtractSkipRuleValuesSet(CubeName, ViewName, 0);
can't ignore ZERO SUPPRESS as cube/view size is already very heavy.....
Output file doesnt have records for those PRODUCT elements where B = C (MEASURE DImension)
I want all those PRODUCT elements to be in output csv file, which have data for MEASURE B and C.
===== PROLOG TAB =====
Creating source view
suppose Cube has 5 dimensions - COUNTRY, PRODUCT, YEAR, MONTH, MEASURE
while creating source view I selected the following (using SubsetCreate & SubsetElementInserrt functions ) -
COUNTRY - Country (top level)
PRODUCT - all leaf level elements using MDX Query
YEAR - pYear ( from parameter)
MONTH - pMonth (from parameter)
MEASURE - A (top level)
what could be the alternative approach, to get the desired result. (ie. All PRODUCT elements having non Zero values)