Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

single value was expected?

I get the below error:

 

ovonel_0-1622806002236.png

 

 

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)

 

3 REPLIES 3
v-henryk-mstf
Community Support
Community Support

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.

amitchandak
Super User
Super User

@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])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

A MAX cannot be added there...

ovonel_0-1622807858600.png

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.