Forum Discussion

Truelearner's avatar
Truelearner
Helper III
6 years ago

ranking issue

I have sales data for employees  In the data we have two levels of employees , high level and low level across mutiple departments . 

i want to find rank of employess by the sales they have done

1. Rank of employee across firm

2. Rank of employee in department 

3. When the user with level as Highlevel is in scope he should see , rank of his group compared to other groups , when lowlevel employee is in scope we should not show him the group rank it has to show blank.

 

We have configured RLS on this report in such a way that if a lowlevel user logs in he will see only his data , when a highlevel user logs in he will his his data and all his lowlevel employees of his department . 

 

The ranking criteria i  mentioned above should not get effected by RLS .. i assume we have create ranking in columns rather than mesaures for this scenario . Please help

 

Below are the test data tables 

 

High levelLow levelDeptID
highlevel 11
 lowlevel12
 lowlevel13
 lowlevel14
 lowlevel25
 lowlevel26
highlevel 27
highlevel 28
highlevel 39
 lowlevel310

 

 

IDSales
110
220
330
440
550
660
770
880
990
1010

 

IDSalesRank indivualRank in DepartmentDept Rank in Firm
110143
22023 
33032 
44041 
55054 
66063 
770721
880811
990912
1010102 

 

 

@mgwena @cham @amitchandak @Greg_Deckler @Mariusz @yij @yij @ v-diye-msft@ v-eachen-msft @@v-juanli-msft @v-jayw-msf v-zhenbw-msft

2 Replies

  • v-lili6-msft's avatar
    v-lili6-msft
    Community Support

    hi  Truelearner 

    For RLS, it works on datamodel level, that means it will filter data in data model, then you use data model to create a measure/column.

    In this way, the row context and filter context won't calculate with filtered data.

    For example:

    If RLS filter data by employee id, now other id will be removed, so it rank will always is "1".

    So your requirement will not be achieved in power bi for now.

     

    Hope this could help you.

     

    Regards,

    Lin

    • Truelearner's avatar
      Truelearner
      Helper III

      how abt creating summary data for rank of all criteria and use it in data model that way we have ranks already cacuclated ?