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
miguelsus2000
Helper III
Helper III

Valor de búsqueda

Hola

Creé una columna "MaximumValue" en mi primer capaz que extrae el "Valor" más alto de la segunda tabla para un producto específico. Sin embargo, también quiero agregar una columna a mi primera tabla llamada "NameOfHighestValue" como una función DAX. Usé la función LookupValue, pero sigo recibiendo un error y no trabajo. Cualquier ayuda es apreciada.
NameOfHighestValueTM lookupvalue(secondtable[name], secondtable[value], max(secontable[value]))

Cualquier guía será genial. Gracias.

Lefttable.pngrighttable.png

2 REPLIES 2
AllisonKennedy
Super User
Super User

¿Cómo se relacionan las tablas 1 y 2? ¿Es un 1 a muchos?

Puede intentar utilizar la función MAXX:

MAXX(FILTER(Table2, Table2[Producto] á Tabla1[Producto] && Table2[Value]-Table1[MaximumValue]), Table2[Name])

Si eso no funciona, proporcione datos de muestra que podemos copiar fácilmente y captura de pantalla de la relación y el error que está recibiendo.

¡Salud!

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

Fowmy
Super User
Super User

@miguelsus2000

Aquí está la fórmula para agregar como una columna a firsttable para obtener el nombre:

NameOfHighestValue =
VAR T1 = 
    FILTER(
        secondtable,
        secondtable[Product]  = firsttable[Product]
    )
VAR __MaxValue =  MAXX(secondtable[Value],T1)
VAR __Name = 
    MAXX(
        secondtable[Name], 
        FILTER(
            secondtable,
            secondtable[Product]  = firsttable[Product] && secondtable[Value] = __MaxValue 
        )
    )
RETURN

__Name

________________________

Si mi respuesta fue útil, considere Aceptarla como la solución para ayudar a los otros miembros a encontrarla

Haga clic en el icono Thumbs-Up si le gusta esta respuesta 🙂

Youtube Linkedin

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

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.