Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am developing an application and need the ability to mask or blind the dimension names for all dimension names with the exception of the dimension value selected. In my use case below I have a bar chart with a dimension called Department with the following dimension values (Finance, IT, Customer Service, Shipping). I then select the Finance Department and I would like the bar chart to show Finance as it is the value selected, but would then like to mask the other three departments to show as Dept 1, Dept 2 and Dept 3.
I have tried to add a calculated dimension, but it does not provide the result I am looking for. Below is an example of what I am trying to achieve.
Can someone provide a solution to my problem?
Thanks!
Excellent, Thank you! Exactly what I needed.
You're supposed to mark my answer "Correct", not yours
Sorry about that, I corrected.
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?
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?
Try:
=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
,aggr(only(DEPT), 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)
)
I incorporated this change in the dimension, but is still not unmasking the names.
I suggest debugging the thing as an expression, testing it piece by piece. For example,
if(ACCESSLEVEL='All', 'Yes, 'no')
etc.
-Rob
Thanks I will try that.
I just used your expression to achieve the same type of chart. Thank you Rob, very helpful.