Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Get Fabric certified for FREE! Don't miss your chance! Learn more
I get the below error:
My code in the Role is:
[Key_Customer] IN
SELECTCOLUMNS(
FILTER(
'Customer',
LOOKUPVALUE(
'Customer'[Key_Customer],
'Customer'[Lead_EmpNo],
LOOKUPVALUE(Employee[EmpNo],Employee[NTUserName], USERNAME())
)
)
,"Cust" ,'Customer'[Key_Customer])
For any given USERNAME() , of course there is only one [NTUserName].
For any given EmpNo, there are many Lead_EmpNo (this is the whole point of the RLS)
Hi @Anonymous ,
That error usually arises by using a function which expects a scalar value but yet the computation of the code returns a tableor more than 1 value.
You probably just want to do something like the similar posts as below: Solved: A table of multiple values was supplied where a si... - Microsoft Power BI Community
If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Anonymous , filter should have true and false , not very clear if this will return true false
try like
[Key_Customer] IN
SELECTCOLUMNS(
FILTER(
'Customer',
LOOKUPVALUE(
'Customer'[Key_Customer],
'Customer'[Lead_EmpNo],
LOOKUPVALUE(max(Employee[EmpNo]),Employee[NTUserName], USERNAME())
)
)
,"Cust" ,'Customer'[Key_Customer])
A MAX cannot be added there...
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 68 | |
| 59 | |
| 44 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 104 | |
| 102 | |
| 37 | |
| 26 | |
| 25 |