Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have a report that is utilizes security from defines roles within our salesforce CRM solution. Essentially, for the RLS, we have DAX code that looks at the username and checks against the user’s company organization to only show them records that pertain to their organization. However, every organization has several sales codes. Currently, when someone has access to an organization, they can see records for all sales codes.
To go one step further, we are passing a string that includes the username, the company organization, and the sales codes. When a user has access to only one sales code, the report is filtered correctly. However, when the report is passed multiple sales codes, the report is blank.
This is what I am using currently to filter at the organization level:
I have tried the following for capturing multiple strings and it did not work:
An example of the string I am trying to parse it the following:
ExampleCompanyName;00512000008ARcPAAW;011045000,074047000
I changed the company name, the value after the ; is the userid value and the two values after userid are sales codes the user would have access to. We receive these values from Salesforce.
What would I need to do to filter at [Sales Code] that would show multiple values if the user has access to more than 1 sales code?
You can treat PATHITEM(3) as its own PATH. (a PATH in a PATH, so to speak). But it would still require hardcoded logic based on PATHLENGTH.
It would be easier if the sales codes per user would be held in a reference table.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
47 | |
24 | |
20 | |
15 | |
12 |
User | Count |
---|---|
55 | |
48 | |
43 | |
19 | |
18 |