/content/folder[@name='Samples']/folder[@name='Cubes']/package[@name='Sales and Marketing (cube)']/model[@name='2008-07-25T15:28:38.072Z'][sales_and_marketing].[Products].[Products].[Product type]filter(descendants(set([sales_and_marketing].[Time].[Time].[Year]->:[PC].[@MEMBER].[20110101-20111231],[sales_and_marketing].[Time].[Time].[Year]->:[PC].[@MEMBER].[20120101-20121231],[sales_and_marketing].[Time].[Time].[Year]->:[PC].[@MEMBER].[20130101-20131231]),[sales_and_marketing].[Time].[Time].[Month]),[Check Measure]>0)[sales_and_marketing].[Measures].[Quantity][sales_and_marketing].[Measures].[Revenue]#/*
Calculated measure, always returns 1. Useful for counting things.
*/#
member(1,'one','one')#/*
Calculated measure, always returns null. Useful for counting things.
*/#
member(null,'null','null')#/*
This finds the minimum value of Check Measure after the values have been filtered out.
If there are any values suppressed in the first pass, the second pass will filter by values greater than what this returns, effectively suppressing a minimum of 1 more cell than are suppressed.
*/#
roleValue(
'_memberUniqueName'
, item(
bottomCount(
[Columns]
, 2
, [Check Measure]
)
, 1
)
)#/*
This finds the minimum value of Check Measure after the values have been filtered out.
If there are any values suppressed in the first pass, the third pass will filter by values greater than what this returns, effectively suppressing a minimum of 1 more cell than are suppressed.
*/#
roleValue(
'_memberUniqueName'
, item(
bottomCount(
[Rows]
, 2
, [Check Measure]
)
, 1
)
)total([One] within set [Rows]) - total([Pass 2] within set [Rows])total([One] within set [Columns]) - total([Pass 3] within set [Columns])#/*
First pass. Is it in range? If so, then null it, else apply 1.
*/#
if([Check Measure] not between 1 and 20000) then ([One]) else ([null])#/*
2nd Pass
This will count the number of cells in the columns, and deduct the number of cells remaining. If the value is greater than 0, then a cell is being suppressed - suppress any cells which are equal to the minimum value remaining.
*/#
if([Pass 1] is null) then ([null]) else (
if(
total([One] within set [Columns]) - total([Pass 1] within set [Columns])=1)
then (
if(roleValue('_memberUniqueName',[Columns]) =[Columns Min]) then ([null]) else ([One])
)
else ([One])
)#/*
3rd Pass
This will count the number of cells in the rows, and deduct the number of cells remaining. If the value is greater than 0, then a cell is being suppressed - suppress any cells which are equal to the minimum value remaining.
*/#
if([Pass 2] is null) then ([null]) else (
if(
total([One] within set [Rows]) - total([Pass 1] within set [Rows])=1)
then (
if(roleValue('_memberUniqueName',currentMember(hierarchy([Rows]))) =[Rows Min]) then ([null]) else ([One])
)
else ([One]))
if([Pass 3] is null) then (null) else (
if ([cc] = 1) then(
if(roleValue('_memberUniqueName',currentMember(hierarchy([Rows]))) =
roleValue('_memberUniqueName',
item(head(
order(filter([Rows], ([cr] >0)and ( [Pass 2] is not null) ) , [Check Measure] ,basc
),1),0)
) ) then (null) else ( [Final Measure])
)
else ( [Final Measure])
)#/*
I don't think this is needed. By pass 4 everything should be suppressed
*/#
#/*If the row contains a single suppression after pass 3... */#
if ([cr] = 1) then (
#/*...then if the current column mun...*/#
if(roleValue('_memberUniqueName',currentMember(hierarchy([Columns]))) =
#/* is equal to the mun of the smallest row that contains a suppresssed cell*/#
roleValue('_memberUniqueName',
item(head(
order(filter([Columns], ( [cc] >0) and ( [Pass 3] is not null ) ) , [Check Measure] ,basc)
,1), 0)
) ) then (null) else ( if ([Pass 4] is null) then (null) else ([Final Measure]))
)
else (if ([Pass 4] is null) then (null) else ([Final Measure]) )
#prompt('Country','mun','[sales_and_marketing].[Retailers].[Retailers].[Retailers]->:[PC].[@MEMBER].[Retailers]','','[sales_and_marketing].[Retailers].[Retailers].[Retailer country]')#No Data Availablesuppression