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

A new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.

Reply
Anonymous
Not applicable

Look up DAX function for a search string

I am creating a DAX code to add a value from another table which statisfies the values supplied. I am trying to search for a text string. It says "A table of multiple values was supplied where a single value was expected.

 

PPR = LOOKUPVALUE('Account Team Member'[UserId],'Account Team Member'[AccountId],Account[Id],'Account Team Member'[TeamMemberRole],"Payroll processing representative")
1 ACCEPTED SOLUTION
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

The reason why this error occurs is that there is many to many relationship between the matched fields referred in LOOKUPVALUE function, and it is not caused by the text "Payroll processing representative".

To resolve the issue, you can change the formula as follow:

 

 

PPR =
CALCULATE (
    FIRSTNONBLANK ( 'Account Team Member'[UserId], 1 ),
    FILTER (
        ALLSELECTED ( 'Account Team Member' ),
        'Account Team Member'[AccountId] = Account[Id]
            && 'Account Team Member'[TeamMemberRole] = "Payroll processing representative"
    )
)

 

 

Best Regards,

Amy

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-xicai
Community Support
Community Support

Hi @Anonymous ,

 

The reason why this error occurs is that there is many to many relationship between the matched fields referred in LOOKUPVALUE function, and it is not caused by the text "Payroll processing representative".

To resolve the issue, you can change the formula as follow:

 

 

PPR =
CALCULATE (
    FIRSTNONBLANK ( 'Account Team Member'[UserId], 1 ),
    FILTER (
        ALLSELECTED ( 'Account Team Member' ),
        'Account Team Member'[AccountId] = Account[Id]
            && 'Account Team Member'[TeamMemberRole] = "Payroll processing representative"
    )
)

 

 

Best Regards,

Amy

 

Community Support Team _ Amy

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thank you. That worked.

mwegener
Most Valuable Professional
Most Valuable Professional

Hi @Anonymous ,

 

the funktion retuns an error when the result_columnName is filtered down to more than on distict value.

https://docs.microsoft.com/en-us/dax/lookupvalue-function-dax

Add the alternateResult parameter to find out which row creates the error.

 

If I answered your question, please mark my post as solution, this will also help others.

Please give Kudos for support.

Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Anonymous
Not applicable

@mwegener Thank you for your response. I am eager to know if i am using the "text" correctly in lookup function

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.