12 Replies Latest reply: May 10, 2017 9:06 AM by Vineeth Pujari RSS

    Get values of a dimension for a current selection

    David Pardoe

      I am trying to access the values for a specific dimension for the current selection so that I can include them in an expression. I have come across GetFieldSelections but I think this only returns values for a dimension if it is actually used in the selection itself.

       

      I need to do this for the following use case:

       

      I have salespeople assigned to teams within an office which in turn is assigned to a region. If I select a region and and then a sales team I would like to return the following in a table/chart (example numbers):

      1) Number of salespeople in team selected = 6

      2) Number of salespeople in region (for team selected) = 125

      3) Number of salespeople in office (for team selected) = 30

       

      1) is simply count(distinct salesperson_id)

      2) can be obtained by using GetFieldSelections as the field region was used in the selection 

      3)  is my challenge as I want to retrieve the offices that are part of the selected region (or alternatively put the offices for the region that the team ultimately selected belongs to).

       

      Any pointers very welcome!

       

      Can I use the P() operator?