cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
RaulCabEstr Visitor
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!

 

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

2 REPLIES 2
Super User IV
Super User IV

Re: "Lookupvalue" works only for first row of the function

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] )
    )
) 

 

Community Support Team
Community Support Team

Re: "Lookupvalue" works only for first row of the function

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.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

January 2020 Community Highlights

January 2020 Community Highlights

Make sure you didn't miss any of the things that happened in the community in January!

Top Solution Authors
Top Kudoed Authors