Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Fellow Experts,
Its Friday and you must be very excited. Hope you would be able to assist me solving this simple RLS query. We have a department who is planning to configure dynamic RLS in Power BI using an existing static table which they maintain for controlling other application access. The table BOOTGROUPS is shown below. A user belongs to only 1 group currently but would belong to multiple groups in future. The DAX query must be able to define the filter using [column names] and NOT static values (DEPARTMENT ="PRESS") etc instead match the values for user available in BOOTGROUPS to IN [DEPARTMENT] column. Hence we would need to create a role using DAX for both scenarios please (if multi group solution can be used for single, cool). Can this be done by defining a single RLS group since we already have the group names in table please ? Kindly provide a solution. Assume we have another table CUSTIDEMAIL containing their CUSTID & EMAIL for matching USERPRINCIPALNAME() in DAX.
BOOTGROUPS
GROUP | CUSTID | PATH NAME | DEPARTMENT | AREA |
SGPRINTINGADMIN | ADAMC | PRINTING/07 | PRESS | CALIFORNIA |
SGPRINTINGUSER | EVANSJ | PRINTING/02 | PRESS | TEXAS |
RNDISTRIUSER | HUGOK | DISTR/02 | DISTRIBUTION | FLORIDA |
RNDISTRIADMIN | FREDC | DISTR/07 | DISTRIBUTION | OHIO |
POSALESUSER | TIMOR | SALES/02 | SALES | ARKANSAS |
KBPRODUCTUSER | EVANSG | PRODUCT/02 | PRODUCT | ILLINOIS |
KBPRODUCTADMIN | HUGOK | PRODUCT/07 | PRODUCT | TEXAS |
POSALESADMIN | STEVEP | SALES/07 | SALES | ILLINOIS |
RNDISTRIADMIN | STEVEP | DISTR/07 | DISTRIBUTION | MICHIGAN |
ACTUALS
DEPARTMENT | AREA | ORDERS | SALES | MARGIN |
DISTRIBUTION | MICHIGAN | 850 | 47690 | 13800 |
DISTRIBUTION | FLORIDA | 1000 | 60000 | 25000 |
PRODUCT | TEXAS | 550 | 75000 | 32000 |
SALES | ARKANSAS | 650 | 79800 | 36300 |
SALES | ILLINOIS | 420 | 54000 | 21000 |
PRESS | CALIFORNIA | 330 | 43000 | 18500 |
PRESS | TEXAS | 480 | 55000 | 22000 |
PRESS | ARKANSAS | 650 | 79800 | 36300 |
PRODUCT | FLORIDA | 630 | 69600 | 40000 |
When user ADAMC logins he should see only records related to PRESS & CALIFORNIA whereas STEVEP should be able to see SALES, DISTRIBUTION, ILLINOIS, MICHIGAN. There are other columns in BOOTGROUPS & other FACT tables like CITY, SOURCE, DEST etc- and I need to be able to expand the DAX query to filter these in future. Thank you very much. Have a fun filled weekend. TIA.
outout
rls on ADMAC
rls on STEVEP
MODEL
create a column in both tables : actuals and bootgroups ( the link between these two tables could be many to many -and that is ok )
your dimusers link it to bootgroups on email .
and create a RLS :
and you are good to go .
let me know if this helps .
If my answer helped sort things out for you, i would appreciate a thumbs up 👍 and mark it as the solution ✅
It makes a difference and might help someone else too. Thanks for spreading the good vibes! 🤠
Hello Daniel, Groups are basically the AD group names which they are maintaining in the table. It is not a combination of Department & Area. SGPRINTINGADMIN group can be tagged to SALES department & area TEXAS as well. Multiple users can belong to the same groups and a user can belong to multiple groups. Same groups can exist for different area also. I don't think above solution will work for mentioned scenario ?
Hi,
Take a look at this blog: https://radacad.com/dynamic-row-level-security-with-profiles-and-users-in-power-bi
I'd to do something similar and this blog helped me.
Proud to be a Super User!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
74 | |
57 | |
38 | |
33 |
User | Count |
---|---|
71 | |
65 | |
58 | |
50 | |
47 |