The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi
I'm new to DAX and Power BI
I have a problem with RLS.
I have a bunch of tables based on Business Central and Excel files. All are linked to the main table "Trades" including the 2 tables : "Seller" and "Purchaser"
I have then set up RLS to the Seller table with : [E_Mail] = USERPRINCIPALNAME()
All good so far
Small example of the "Trades" table
Trade No | Amount | Seller | Purchaser |
1 | 500 | JOE | JOE |
2 | 200 | SAM | SAM |
3 | 522 | JOE | SAM |
4 | 632 | KATE | SAM |
5 | 5612 | JOE | JOE |
6 | 6523 | KATE | KATE |
7 | 522 | KATE | SAM |
Problem is now that SAM only has access to the details in no. 2, where he's the Seller
I am looking for a way to give access to all the deals that the employees are involved in.
So SAM should see lines 2, 3, 4, 7
Any ideas?
Solved! Go to Solution.
@CHRBAR
You can setup a RLS rule using a measure as follows, my table is Table33.
Measure: NOTE: "SAM" to USERPRINCIPALNAME()
VAR __User = "SAM"
VAR __Result = __User IN ({Table33[Seller], Table33[Purchaser]})
RETURN
__Result
My testing:
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
@CHRBAR
You can setup a RLS rule using a measure as follows, my table is Table33.
Measure: NOTE: "SAM" to USERPRINCIPALNAME()
VAR __User = "SAM"
VAR __Result = __User IN ({Table33[Seller], Table33[Purchaser]})
RETURN
__Result
My testing:
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |