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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Lookup Formula - Error multiple values

Hi all,

I'm trying to do pull a value out of one table by and matching it to another table where customers both have the same IDs.  Similar to an index match in excel. I'm using the LOOKUP formula and I keep getting an error message.

 

Basically I need to check that if a customer has been with us for X days that they've had a certain number of appointments. EG: If they're commenced with us for between 6-8 months they need to have had two appointments. Data is sourced from two different tables but will have matching IDs as follows: 

 

Table 1

IDs   Number_Of_Appointments

 

Table 2

IDs    Commenced_Days

 

Currently trying = LOOKUP ( <Table 2 [Commenced_Days]>, <Table 2 [IDs]>, <Table 1 [IDs]) 

 

But this gives me an error " "A table of multiple values was supplied where a single value was expected" - does anyone know what that means and can fix the error in my formula? 

 

Thanks

Shivvy

1 ACCEPTED SOLUTION
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

Give this a shot

 

Column =
VAR myID = Table1[IDs]
RETURN
    CONCATENATEX (
        CALCULATETABLE ( VALUES ( Table2[Commenced_Days] ), Table2[IDs] = myID ),
        [Commenced_Days],
        ","
    )

Regards
Zubair

Please try my custom visuals

View solution in original post

1 REPLY 1
Zubair_Muhammad
Community Champion
Community Champion

@Anonymous 

 

Give this a shot

 

Column =
VAR myID = Table1[IDs]
RETURN
    CONCATENATEX (
        CALCULATETABLE ( VALUES ( Table2[Commenced_Days] ), Table2[IDs] = myID ),
        [Commenced_Days],
        ","
    )

Regards
Zubair

Please try my custom visuals

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.