I have one additional use case that I need to be able to support. I have added an additional column in my Edit Script that is ACCESSLEVEL and it will be set to either All or Limited. If it is Limited it will provide the masking logic that you previously provided, but if it is all then I want all of the actual named DEPTs to be shown and not masked. I added the following logic, but it did not work.
=PICK(MATCH(ACCESSLEVEL,
'All' // When a user signs in with this as their ACCESSLEVEL I want the DEPT dimension to show w/o masking
,'Limited') // This works as you defined
,DEPT
,aggr(if(len(only({<DEPT=, USERID=>}DEPT))> 0 ,
if(only({<DEPT=, USERID=>}DEPT)=Only(DEPT) ,DEPT,
'Dept' & FieldIndex('DEPT', only({<DEPT=, USERID=>}DEPT))))
, DEPT)
)
What am I missing?