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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
some1else
Helper II
Helper II

Lookupvalue error

Hi guys.

 

Past week I had this working, now I made some adjustments to my data and it no longer works. So, I'm hoping someone can help me.

 

Background info:

The street name can exist in another county, so I need to extract just the street matching the county I selected in slicer.

When selected, RUA from OTs has a name and county. I would need to retrieve COMPRIMENTO from COMP_RUA, RAMAIS_AA from RAMAIS_AA and Column1 from REDE_RENOVADA.

 

The function I was using before was like this in a calculated column: LOOKUPVALUE(COMP_RUA[COMPRIMENTO],COMP_RUA[ENDERECO],OTs[RUA],COMP_RUA[FREGUESIA],OTs[FREGUESIA])

 

But now it says the table supplied has multiple values.

 

I need to extract the exact COMPRIMENTO from the street (RUA) selected in OTs table.

 

Note: I'm using . for decimal values and , in regional settings.

That's why you probably will be confused in the function above.

relations.jpg

1 ACCEPTED SOLUTION

Hi @some1else ,

Try to use firstnoblank() to create columns:

Column = 
CALCULATE (
    FIRSTNONBLANK ( 'Folhal'[COMPRIMENTO], 1 ),
    FILTER (
        'Folhal',
        'Folhal'[RUA] = 'OTs'[RUA]
            && 'Folhal'[FREGUESIA] = 'OTs'[FREGUESIA]
    )
)

Please refer this viedo about how to deal with this error in lookupvalue.

 

In addition, attached a simple sample in the below, hopes it could help.

 

Best Regards,
Community Support Team _ Yingjie Li
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

3 REPLIES 3
amitchandak
Super User
Super User

Thanks for the reply. I've watched the videos, but still facing the same problem. I've converged all the info that was spread in other tables into one single table that contains the details of each street.

 

Please check image below containing new relationships

Sem Título2.jpg

 

If I make a new column in OTs with this function it gives an error (see image below)

Sem Título3.jpg

 

I need it to give me the COMPRIMENTO value for the RUA and FREGUESIA user selects in slicer.

In this case, there's more than one "Rua Areias" in Folha1 table, that's why user needs to select FREGUESIA for it to grab the unique value.

Hi @some1else ,

Try to use firstnoblank() to create columns:

Column = 
CALCULATE (
    FIRSTNONBLANK ( 'Folhal'[COMPRIMENTO], 1 ),
    FILTER (
        'Folhal',
        'Folhal'[RUA] = 'OTs'[RUA]
            && 'Folhal'[FREGUESIA] = 'OTs'[FREGUESIA]
    )
)

Please refer this viedo about how to deal with this error in lookupvalue.

 

In addition, attached a simple sample in the below, hopes it could help.

 

Best Regards,
Community Support Team _ Yingjie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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