Search code examples
.netssasolap

What the fastest way to get filtered attribute members in amo?


My aim is to get filtered member list including its properties from specific hierarchy. It's critical because of huge hierarchy.

I found two slow way:

  1. MDX: it doesn't support like function.
  2. $SYSTEM.MDSCHEMA_MEMBERS: slow and no like function either.
  3. Amo: ?? Couldn't find a way.

What the way EXCEL, BIDS or any other viewer handles that?


Solution

  • I found out the answer simply by debugging the action in SQL Server Profiler, I was sure there was some function within AMO library. It uses MDX query, i.e.:

    SELECT SUBSET( FILTER( ADDCALCULATEDMEMBERS( [Client].[Code].[All clients].CHILDREN ), ( INSTR( [Client].[Code].CurrentMember.Name, "999" ) > 0 ) ), 0, 1001 ) DIMENSION PROPERTIES MEMBER_NAME, MEMBER_TYPE ON 0, {} ON 1 FROM [MyCube]