What is the difference between create member and WITH member? Is it the scope? WITH is for query scoped calculated members. Does Create member last for the entire transaction? Where does it resides? Cache or memory?
asked Dec 08, 2011 at 01:39 PM in Default
To create a calculated member that is available throughout a Multidimensional Expressions (MDX) session, you use the CREATE MEMBER statement. A calculated member that is created by using the CREATE MEMBER statement will not be removed until after the MDX session closes OR DROP explicitly before the session closes. Whereas, If a calculated member is only required for a single Multidimensional Expressions (MDX) query, you can define that calculated member by using the WITH keyword. A calculated member that is created by using the WITH keyword no longer exists after the query has finished running. Member created through both statements will reside in memory. So yes, it can easily be said that the difference is only the scope. Hope it clears your ambiguity.
answered Dec 09, 2011 at 03:34 AM