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.
Experts,
how to write below subquery DAX function in Power BI? I am new to this world.
Please help.
SELECT * FROM DWH.DATATABLE WHERE SCHOOL_ID =
/*below code should be in row level security DAX Function */
SELECT SCHOOL_ID FROM DWH.RLS WHERE IDENTITYID IN
(SELECT IDENTITYID FROM DWH.RLS WHERE EMAIL=UserPrincipalName()
)
Thanks,
Raj.
Generally you will want to let your data model do the RLS work. Is your DWH.RLS table part of thedata model? Is it linked to the DWH.Datatable via the school_id ?
If yes then all you need to do is specify the RLS rule
EMAIL=UserPrincipalName()
Based on the business requirement it should be applied in sub query to get the required results.
User | Count |
---|---|
8 | |
7 | |
2 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
4 |