Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I'm looking for solution to my problem. I have 3 tables with data from all of my customers (multitenant):
Drivers (id, name, clientId, ... ), Vehicles (id, name, clientId, ...) and rides (Id, vehicleId, driverId, clientId, ...).
On top of that I have build several reports and embed them in my application.
I implement row level security by clientId -> when customer displays reports in my application I filter above tabels by clientId. And everything works fine exect one scenario.
When I have rides where driverId is null (which is completely correct from business point of view) RLS filters that rows (through driver to rides relation).
How to implement it so rows in Rides that have driverId = null won't be filtered???
Many thanks
hi @pyskaty
For your case, you could try this way as below:
I assume that this is a simple sample data, and you use [Name] for RLS
Drivers
rides
for your case, add a calculated column in rides table
Name for rls = RELATED(Drivers[Name])
Now define RLS use this new column [Name for rls] instead of [Name]
[Name for rls] = "A"||[Name for rls] =blank()
of course you need adjust the relationship as below:
Result:
Regards,
Lin
Hey @pyskaty
Easiest solution is to replace the "null' with a value or word to include in the filter.
If this helps please kudo.
If this solves your problem please accept it as a solution.
The trick is that I'm not filtering Rides table by driverId, only by clientId. Rows from Rides tabel are filtered because of relation between Rides and Drivers tabel (drivers are also filtered by clientId and then applied to Rides table - where 'NULL' driver didn't exists so it filters Rides where driverId is null).
I'm considering creating shadow driver for every klient and insert its Id for Rides that normaly have NULLa. But maybe there is some other, simpler solution.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
63 | |
63 | |
53 | |
39 | |
25 |
User | Count |
---|---|
85 | |
57 | |
45 | |
43 | |
38 |