0

I have created a set to filter out the entire date dimension to it's respective measure:

CREATE SET DatesAvailable AS NonEmpty ([Date].[Hierarchy].[Day].MEMBERS, Measures.CURRENTMEMBER);

I would like for the filter to be applied automatically when using the date dimension in the cube browser. I've tried this but it returns a error related to the LastNonEmpty aggregate.

SCOPE( UNION( MEASUREGROUPMEASURES('MeasurerpG1') , MEASUREGROUPMEASURES('MeasureGrp2') , MEASUREGROUPMEASURES('MeasureGrp3') ) );

[Date].[Hierarchy].[Day].MEMBERS = DatesAvailable ;  

END SCOPE;

How can I apply my set to filter the date dimension?

dirtyw0lf
  • 1,899
  • 5
  • 35
  • 63

1 Answers1

1

I do not think you can filter which members are shown in member lists, as presumably these list are not fetched via MDX, but via metadata lookups like the MDSCHEMA_MEMBERS schema rowset. You can more or less only change values in the calculation script which are then used in MDX statements. And you can add calculated members, which do then also appear in the metadata.

The only option I see to not display certain members in general tools where you do not have control how the tool generates the list of members that it shows would be by setting permissions.

FrankPl
  • 13,205
  • 2
  • 14
  • 40
  • Indeed this seems to be the behavior I am seeing when using the browser, or connecting in Excel. (The filter cannot be applied in Excel). Does this mean that the cube initialises it's members for the date dimension before I put the DateAvailable filter to it, and after the DateAvailable filter is applied, MDX is used to narrow down the selection? I'm curious about that point, because when the filter is applied, the dimension filter narrows to what's available. Not sure if it's just looking at the actual grid to get the values, but definately curious to know what's going on under the hood. – dirtyw0lf Apr 04 '14 at 20:41
  • Actually, I think your assignment to `[Date].[Hierarchy].[Day].MEMBERS` does not do what you think. `Members` is a function that returns a list of members, i. e. you can read the members, but you cannot assign something to it. – FrankPl Apr 08 '14 at 08:26
  • What do you suggest changing it to? – dirtyw0lf Apr 10 '14 at 13:17
  • @dirtyw0lf I just do not think you can assign anything to the member list. I am not aware of any possibility to change the list of non calculated members of an attribute in the calculation script. – FrankPl Apr 11 '14 at 06:02