DefaultContext
EAZYBI Returns current tuple result assuming Default level for all other dimensions that are not specified.
Syntax
DefaultContext( tuple )
Arguments
tuple | Combination of members from different dimensions in MDX syntax (member_1, member_2, ..., member_n) |
---|
Examples
There are several ways to create reports on Epics. For example when using Issue dimension on rows and selecting several Issue property Measures on columns, it would be possible to see various information about Issues. When selecting the Issue Type on Pages to only show Epic, the report would be displaying only information about Epic issues.
The Hours Spent Measure in this case would show the Hours spent for the Epic issue itself. If instead it would be necessary to see Hours Spent for issues within Epic this information would be retrieved by using Epic Link dimension member combined with Hours Spent measure in tuple
( [Epic Link].[Epic].getMemberByKey([Issue].CurrentMember.Key), [Issue Type].DefaultMember, [Issue].DefaultMember, [Measures].[Hours spent] )
Note how in above tuple it is necessary to specify DefaultMember for Issue dimension and Issue Type dimension. This is because otherwise we would be looking for Issues within Epic that are with Issue Type Epic as selected in Pages. As such case is not possible, we would not get any result for Hours spent on Issues with type Epic.
So that it would not be necessary to specify DefaultMember for all dimensions that might be used in report for which the selection should be ignored, it would be easier to use the DefaultContext() function for the tuple and only specifying which dimensions should not be ignored. In the described case the Time would not be ignored as Hours spent on Issues within Epic should also be displayed for the Time period that is selected. All other dimensions can be on default level
DefaultContext(( [Epic Link].[Epic].getMemberByKey([Issue].CurrentMember.Key), [Time].CurrentMember, [Measures].[Hours spent] ))