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.
Hi,
I have to filter the report based on the branches the user has access to. I have a table called BRANCHESLIST which carries the information of branch numbers and user emails.
ASSETSETUPVIEW is the table I want to filter. Using filter directly on RLS throws an error:
I created a measure
and then used RLS which gives the following error:
How can I filter the table in this scenario?
Solved! Go to Solution.
Hi @HariniParthiban ,
You can place the following code:
var UPN=USERPRINCIPALNAME()
var UserRow=
CALCULATETABLE(
'BRANCHESLIST',
'BRANCHESLIST'[EMAAIL_FW]=UPN)
var Flag=
SELECTCOLUMNS(
UserRow,'BRANCHESLIST'[COSTCENTER])
var Result=
FILTER(
'ASSETSETUPVIEW','ASSETSETUPVIEW'[COSTTCENTRE_FW] in Flag)
RETURN
IF(
'ASSETSETUPVIEW'[COSTTCENTRE_FW] in Flag,TRUE(),FALSE())
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @HariniParthiban ,
You can place the following code:
var UPN=USERPRINCIPALNAME()
var UserRow=
CALCULATETABLE(
'BRANCHESLIST',
'BRANCHESLIST'[EMAAIL_FW]=UPN)
var Flag=
SELECTCOLUMNS(
UserRow,'BRANCHESLIST'[COSTCENTER])
var Result=
FILTER(
'ASSETSETUPVIEW','ASSETSETUPVIEW'[COSTTCENTRE_FW] in Flag)
RETURN
IF(
'ASSETSETUPVIEW'[COSTTCENTRE_FW] in Flag,TRUE(),FALSE())
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
73 | |
72 | |
39 | |
31 | |
26 |
User | Count |
---|---|
97 | |
87 | |
43 | |
40 | |
35 |