First I set the values of apex_biee_key in the rpd using a simple query (in our set up this value is set by the apex application).
Initialization block to populate apex_biee_key

Substring function to extract the first two letters as follows doesn’t work because the subtotal operation is performed AFTER the substring command is done

You get then for the first subtotal 1 instead of 2 because even though the aggregation is set to “count distinct” , it's counting 'CA'

The solution we used kind of a kludge but it worked): change the Type data type to “HTML” and using a CSS to hide the WID part, enter the following in the column formula:
is basically a CSS tag to hide text
And voila you get
And let's assign user_a to all the groups except SECURITY and let's assign user_b to all the groups. When user_a login they get the left navigation menu without SECURITY
While user_b
gets all the links:

This is nice, when creating a link to a dashboard using "link/image" one only need to secure the dashboard then the link is secured de facto.

