1
votes

I want to load textual data on any member in a natural hierarchy in icCube, but I am not able to display the textual values with MDX for the upper-levels.

Consider the following (natural) hierarchy, data and expected outcome:

enter image description here (It might look a bit weird, but icCube allows to have the leaf empty for SUB013 and SUB014.)

As you can see in the desired outcome in the picture above, I expect "voila" to be displayed on SUB015.

But, I can not get it to work. See the outcome I get with MDX: outcome in icCube MDX

I have the following issues:

  1. the value is empty (I have used the no aggregation type on text)
  2. another observation is that also the amount is empty for a no aggregation type

Is this solvable, somehow?

(enclosed as a snippet - not runnable - the schema I used, which you can upload in your instance of icCube)

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<schemaFactory revisionNumber="77">
    <schemaDefinition name="text on sub-total" description="" group="Research" loadOnStartup="false">
        <activateIncrementalLoad>false</activateIncrementalLoad>
        <useUnknownMembersInFacts>false</useUnknownMembersInFacts>
        <autoCleanUpTableColumns>false</autoCleanUpTableColumns>
        <useFactPartitioning>false</useFactPartitioning>
        <callGarbageCollector>NONE</callGarbageCollector>
        <backup>NONE</backup>
        <nonEmptyCachePolicy>NONE</nonEmptyCachePolicy>
        <nonEmptyCacheType>REGULAR</nonEmptyCacheType>
        <nonEmptyCachePersistency>MEMORY</nonEmptyCachePersistency>
        <storagePolicy>DEFAULT</storagePolicy>
        <hierarchyUniqueNameStyle>IncludeDimensionName</hierarchyUniqueNameStyle>
        <inMemoryDS name="manual">
            <memoryDataTable tableName="data" rowLimit="-1" id="3c476e37-708d-4066-831c-89508134beb7">
                <column name="dim" tableType="STRING" type="STRING" selected="true" primaryKey="false" nullObjectAsString=""/>
                <column name="costs" tableType="STRING" type="DOUBLE" selected="true" primaryKey="false" nullObjectAsString=""/>
                <column name="text" tableType="STRING" type="STRING" selected="true" primaryKey="false" nullObjectAsString=""/>
                <addRowNumber>false</addRowNumber>
                <stringDateConverter></stringDateConverter>
                <trimStrings>true</trimStrings>
                <columnSeparator>\t</columnSeparator>
                <commentMarker>#</commentMarker>
                <dataAsString>dim	costs	text
CHILD001		
CHILD002		
CHILD003	10	hi
CHILD004		
CHILD005		
SUB013	59	salut
SUB014	69	bonjour
SUB015	180	voila
</dataAsString>
            </memoryDataTable>
            <memoryDataTable tableName="dim" rowLimit="-1" id="373a4b14-5b7d-441d-91c0-caabeb670936">
                <column name="SubTotal" tableType="STRING" type="STRING" selected="true" primaryKey="false" nullObjectAsString=""/>
                <column name="Leaf" tableType="STRING" type="STRING" selected="true" primaryKey="false" nullObjectAsString=""/>
                <addRowNumber>false</addRowNumber>
                <stringDateConverter></stringDateConverter>
                <trimStrings>true</trimStrings>
                <columnSeparator>\t</columnSeparator>
                <commentMarker>#</commentMarker>
                <dataAsString>SubTotal	Leaf
SUB013	
SUB014	
SUB015	CHILD001
SUB015	CHILD002
SUB015	CHILD003
SUB015	CHILD004
SUB015	CHILD005
</dataAsString>
            </memoryDataTable>
        </inMemoryDS>
        <multiLevelDimension dataTableId="373a4b14-5b7d-441d-91c0-caabeb670936" isTimeDimension="false" isDefaultTimeDimension="false" isIndexingByRange="false" unknownMemberName="" id="6b08783b-b33c-4499-b253-212753be23fd" name="Dim">
            <multiLevelHierarchy hasAllLevel="true" allLevelName="All-L" allMemberName="All-M" name="Dim" isDefault="true" defaultMemberName="">
                <factAggregationType>MEMBER_AND_ANCESTORS</factAggregationType>
                <level name="subtotal" nameUnique="true" nameUniqueInParent="false" keyUnique="true" ignoreNameCollision="false">
                    <column name="SubTotal"/>
                    <nameCol name="SubTotal"/>
                    <orderType>NONE</orderType>
                    <orderKind>ASC</orderKind>
                </level>
                <level name="leaf" nameUnique="true" nameUniqueInParent="false" keyUnique="true" ignoreNameCollision="false">
                    <column name="Leaf"/>
                    <nameCol name="Leaf"/>
                    <orderType>NONE</orderType>
                    <orderKind>ASC</orderKind>
                </level>
            </multiLevelHierarchy>
        </multiLevelDimension>
        <cube id="1c361ef2-ebba-475f-9cc8-83910e4530e2" name="data" description="">
            <defaultFacts measureGroupName="Facts" partitioningLevelName="" partitioningType="NONE" newGeneration="true" dataTableId="3c476e37-708d-4066-831c-89508134beb7" aggregateDataSourceFacts="false" unresolvedRowsBehavior="ERROR">
                <rowFactAggregationType>ADD_ROW</rowFactAggregationType>
                <measure name="costs sum" aggregationType="SUM">
                    <rollupHierarchy></rollupHierarchy>
                    <dataColumn name="costs"/>
                    <cellProperties></cellProperties>
                    <emptyIsZero>false</emptyIsZero>
                </measure>
                <measure name="costs max" aggregationType="MAX">
                    <rollupHierarchy></rollupHierarchy>
                    <dataColumn name="costs"/>
                    <cellProperties></cellProperties>
                    <emptyIsZero>false</emptyIsZero>
                </measure>
                <measure name="costs no agg" aggregationType="NONE">
                    <rollupHierarchy></rollupHierarchy>
                    <dataColumn name="costs"/>
                    <cellProperties></cellProperties>
                    <emptyIsZero>false</emptyIsZero>
                </measure>
                <measure name="text max" aggregationType="MAX">
                    <rollupHierarchy></rollupHierarchy>
                    <dataColumn name="text"/>
                    <cellProperties></cellProperties>
                    <emptyIsZero>false</emptyIsZero>
                </measure>
                <measure name="text no agg" aggregationType="NONE">
                    <rollupHierarchy></rollupHierarchy>
                    <dataColumn name="text"/>
                    <cellProperties></cellProperties>
                    <emptyIsZero>false</emptyIsZero>
                </measure>
                <links dimensionId="6b08783b-b33c-4499-b253-212753be23fd">
                    <viewLinks type="ALL_LEVELS">
                        <toColumns name="dim"/>
                    </viewLinks>
                </links>
            </defaultFacts>
        </cube>
        <localization enabled="false"/>
        <script>
            <content>
            </content>
        </script>
    </schemaDefinition>
</schemaFactory>
1

1 Answers

1
votes

In icCube a node value, even if leaf, can be the result of an aggregation over multiple facts rows. When you specify, NO_AGGREGATION, as aggregation method the NULL is returned if more than one single row is in play.

For you example as SUB015 has a child with value, CHILD003. And the dimension is defined with 'Fact Aggr. Type' as 'Members and Ancestors'.

Two solutions :

1) Add a Dimension member property that is retrieved using a calculated member.

2) Use a dimension with 'Fact Aggr. Type' as 'Members' but you will get wrong cost.