Row Level Security User Profile Issue

Hello Team,
I am struggling with row level security and i need your help please.

I’m working on power bi RS version

The purpose of my project is to display data from request Details table according to user profiles and application type

I have Application Table & Entitlement Table, each application have multiple entitlement.
I have a request Details Table which conatins all requests for access to the Entitlement and their status if it’s approval or provision.

the data will be displayed based on these conditions:

  • If Application Type = Application User an see all requests for the application

  • If Application Type <> Application User can see only requests on the entitlement level

I started by creating an Application Profile table from Application Table and Entitlement Table wich contain Columns (UserId, ApplicationId, EntitlementId,TeamId and User Role).

From this point i don’t know how to display the correct data.

This an 3 Exemples from PBIX attached.

  • U1 should see all requests for A1 as ApplicationOwner Role and ApplicationType = Application
  • U2 should see all requests for A1 as StaticProvisionerTeammember Role and ApplicationType = Application and should see all requests for E3 in A2 as EntitlementOwner Role and ApplicationType = Share.
    image

I need also to filter by Role, Team, Application and Entitlement

Analytics Data Source.xlsx (14.2 KB)
Analytics Sample.pbix (71.6 KB)

Thank you in advance

@Tahar I would like to help you. You mentioned you created a table yourself to make this happen. Can you let me know which are you original tables coming from your source(s)?

Hi Delbert, all tables come from the source except the ApplicationProfile table which I created from information from the Application and Entitlement tables.

Is this data model achieving what you are looking for?

The accompanying measures that I created:

Number of Applications = COUNTROWS(‘Application’)

Number of Entitlements =
CALCULATE(
COUNTROWS(Entitlement),
USERELATIONSHIP(User[IdUser], Entitlement[Entitlement Owner])
)

Sorry Danny, it’s not what i m looking for. All my KPIs will be calculated from RequestDetails table
I need to show the DistinctCount [IdRequest] based on User Profile and Application Type.
User Profile are :
Application Owner
Entitlement Owner
team Approval
team Provisioner

This is an example :
User raise a request to access to application via an Entitlement.
the request goes through tow step

  1. Approval by Application Owner or Entitlement Owner or a member of team approval.
  2. Provisionning by member of team provisioner

Case1
If Application Type = Application then user can see all requests for Application Level
Profile who should access are
Application Owner
team Approval for Application
team Provisioner for Application
Entitlement Owner
team Provisioner for Entitlement
If Application Type <> Application then user can see all requests for Entitlement Level
Profile who should access are
Entitlement Owner
team Provisioner for Entitlement