I want to do an ABC-Analysis of the Items sold (A being top 20%, B between 20% and 80%, C the rest)I've created in the cube 3 Dynamic Sets [A], [B] and [C] and a calculated measure to set the group CREATE DYNAMIC SET CURRENTCUBE.[Set for ABC] AS NonEmpty( [Item].[Item].[Item].MEMBERS, [Measures].[Net Value] );CREATE DYNAMIC SET CURRENTCUBE.[A1] AS TopPercent( [Set for ABC], 20, [Measures].[Net Value] );CREATE DYNAMIC SET CURRENTCUBE.[B1] AS except( TopPercent( [Set for ABC], 80, [Measures].[Net Value] ) , TopPercent( [Set for ABC], 20, [Measures].[Net Value1] ));CREATE DYNAMIC SET CURRENTCUBE.[C1] AS except([Set for ABC] ,TopPercent( [Set for ABC], 80, [Measures].[Net Value] ));-- Sets Group based on membershipCREATE MEMBER CURRENTCUBE.[Measures].[ABC Group] AS iif(IsEmpty( [Measures].[Measure for ABC] ), null, iif(Exists( [Item].[Item].[Item], [A]).count >0,'A' ,iif(Exists( [Item].[Item].[Item], [B]).count >0,'B' ,'C')));When I run a query it allways returns 'A' as the group.When I set a calculated measure in my query and select that value I get the proper group.With MEMBER [Measures].[ABC Group New] AS iif(IsEmpty( [Measures].[Measure for ABC] ), null, iif(intersect( [A],[Item].[Item].currentmember).count >0,'A' ,iif(intersect( [B],[Item].[Item].currentmember).count >0,'B' ,'C')))306,75 A C90,32 A C93,14 A C5,4 A C743,1 A C193,74 A C103,52 A C1027,38 A C41,18 A C1148,03 A C276,08 A C405 A C72,06 A CIt seems that for the cube calculated measure the set [A] contains all items i.s.o. the top 20 percent.
↧