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
RaulCabEstr
Regular Visitor

"Lookupvalue" works only for first row of the function

I have this column and with this code:

 

Proyecc = if('Ritmo Diario'[Tipo_Dato] = "Real", 'Ritmo Diario'[REAL (t)],LOOKUPVALUE(Resumen_Ritmo_Diario[Prom],Resumen_Ritmo_Diario[Concat3],'Ritmo Diario'[Concat3]))

 

As you can see, the function is a condtional. Works perfectly on the first case (copy "Real (t)" data). Nevertheless, on the second case only works for the first row, even though the input data of "lookupvalue" function is equal of the others...

¿How can i fix it and get "189" also for the rest of rows? The input "20199CARLOS LEON" is the same!

 

This is the problem: Function works only for the first row of "Proyección" data, even though other rows are equalThis is the problem: Function works only for the first row of "Proyección" data, even though other rows are equal

2 REPLIES 2
v-lid-msft
Community Support
Community Support

Hi @RaulCabEstr ,

 

For the issue, I cannot reproduce it here, Can you kindly share some sample information about another table if you don't have any Confidential Information?

 

11.PNG

 

 

BTW, my pbix as attached.

 

Best regards,

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

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
jdbuchanan71
Super User
Super User

That is odd.  Are you sure there are no spaces on the end of the Concat3 field for the rows that are not returning values?

Maybe try this

Proyecc =
IF (
    'Ritmo Diario'[Tipo_Dato] = "Real",
    'Ritmo Diario'[REAL (t)],
    LOOKUPVALUE (
        Resumen_Ritmo_Diario[Prom],
        Resumen_Ritmo_Diario[Concat3], TRIM ( 'Ritmo Diario'[Concat3] )
    )
) 

 

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.