Forum Discussion

CMSGuy's avatar
CMSGuy
Helper III
3 years ago
Solved

LOOKUPVALUE error

PrevFLComments =
VAR Userx = 'Daily Certification Full'[Emp Full Name]
VAR PrevDate = DATEADD('Daily Certification Full'[DateEntered],-1,MONTH)
RETURN
COALESCE(LOOKUPVALUE('Daily Certification Full'[Field Leader Comment],'Employee Certifications'[Emp Full Name],Userx,'Daily Certification Full'[DateEntered],PrevDate),"NA")
 
That is the DAX.  Why would I be getting an error: "A table of multiple values was supplied where a single value was expected".  However I have this exact same formula getting the Field Leader Name and there are no errors for it.  Is this because it might be returning mulitple values?  If so, would there be a way to concatenate each into a RETURN value?
  • CMSGuy,

     

    It appears that 'Daily Certification Full'[Field Leader Comment] has multiple values resulting from the lookup. You could use FILTER to create a virtual table with the relevant rows, and then use CONCATENATEX to concatenate the values in the virtual table.

2 Replies

  • CMSGuy,

     

    It appears that 'Daily Certification Full'[Field Leader Comment] has multiple values resulting from the lookup. You could use FILTER to create a virtual table with the relevant rows, and then use CONCATENATEX to concatenate the values in the virtual table.

    • CMSGuy's avatar
      CMSGuy
      Helper III

      Thank you and yes, I found that there is some "test" data being delivered and it has duplicate entries.  I filtered that and it is good.  Thanks for the reply