Page 1 of 1
View Title Element Not Defined
Posted: Mon Oct 17, 2011 1:52 am
by winsonlee
There are one thing that i would like to clarify if it will effect the view.
I have one dimension name "Customer". This dimension is updated using a process and all elements will be deleted before populating the element again.
I have created a view by selecting the element from the "Customer" dimension manually. It is not through expression nor the selected element is save as subset.
There are a few times when i open the view, there isnt any element selected on the Customer dimension and I have to manually assign element again to the view.
From your point of view, the nightly process that deletes and repopulate the element into the Customer dimension, will it effect the element to be missing when the view is open ?
when a view is created, is it advisable to save the element selected on dimension as subset ?
Re: View Title Element Not Defined
Posted: Mon Oct 17, 2011 12:14 pm
by Wim Gielis
winsonlee wrote:From your point of view, the nightly process that deletes and repopulate the element into the Customer dimension, will it effect the element to be missing when the view is open ?
Yes, that will be the cause.
You do not need to delete all elements when you update the dimension. Is there a particular reason why you would do that?
Re: View Title Element Not Defined
Posted: Mon Oct 17, 2011 11:23 pm
by winsonlee
each customer is belongs to a group within a hierarchy. There are times where a customer is move from one group to another. if all element is not deleted, there are times where an element belongs to two parents when it is suppose to be only one.
at the moment i am trying to use expression to create subset for the dimension and save the view using the subset defined. Hope this will resolve the issue.
Re: View Title Element Not Defined
Posted: Tue Oct 18, 2011 5:20 am
by lotsaram
You should look into "unwinding" the dimension rather than clearing all elements as part of the nightly rebuild. Then your subsets won't be impacted.u
Re: View Title Element Not Defined
Posted: Tue Oct 18, 2011 5:25 am
by rmackenzie
winsonlee wrote:There are times where a customer is move from one group to another. if all element is not deleted, there are times where an element belongs to two parents when it is suppose to be only one.
You can remove all the parent-child relationships from the dimension before the nightly update process is run. This is often called 'unwinding' the dimension. You use the TI function DimensionElementComponentDelete to do this. Once you've unwound the dimension, as long as the data source only allocates one customer per parent then your dimension will reflect this. Then you don't have to actually delete elements and this should improve your issue with cube views.
The code to unwind all parent-child relationships is:
Code: Select all
# unwind dimension
sDimName = 'YOUR_DIMENSION_NAME';
nElemCounter = 1;
nTotalElems = DIMSIZ ( sDimName );
WHILE ( nElemCounter <= nTotalElems );
sElemName = DIMNM ( sDimName, nElemCounter );
IF ( DTYPE ( sDimName, sElemName ) @= 'C' );
nChildren = ELCOMPN ( sDimName, sElemName );
WHILE ( nChildren > 0 );
sChildElem = ELCOMP ( sDimName, sElemName, nChildren );
DimensionElementComponentDelete ( sDimName, sElemName, sChildElem );
nChildren = nChildren - 1;
END;
ENDIF;
nElemCounter = nElemCounter + 1;
END;