Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hola
Necesito ayuda sobre cómo puedo obtener el valor de la columna "Tipo" basado en la fecha máxima de compra por número de producto y ProductLineNum. Por ejemplo, para el número de producto 5100, la fecha máxima de compra es el 25/10/2019, por lo que debe devolver el valor de "Equipo principal".
Resultado previsto:
Estoy probando la fórmula VAR y RETURN pero no pude hacerlo bien.
Gracias de antemano
Solved! Go to Solution.
¡Hola @summer18! Prueba esto:
Latest Type =
CALCULATE (
MAX ( Table[Type] ),
FILTER (
'Table',
'Table'[Purchased Date]
= CALCULATE (
MAX ( 'Table'[Purchased Date] ),
FILTER ( Table, 'Table'[Product Number] = EARLIER ( 'Table'[Product Number] ) )
)
&& [Product Number] = EARLIER ( [Product Number] )
)
)
¡Espero que esta respuesta resuelva su problema!
Si necesita ayuda adicional, por favor @ me en su respuesta.
Si mi respuesta le proporcionó una solución, considere marcarla como una solución ✔️ o darle un kudoe 👍
¡Gracias!
¡También puedes echar un vistazo a mi LinkedIn!
Saludos
Gonçalo Geraldes
¡Hola @summer18! Prueba esto:
Latest Type =
CALCULATE (
MAX ( Table[Type] ),
FILTER (
'Table',
'Table'[Purchased Date]
= CALCULATE (
MAX ( 'Table'[Purchased Date] ),
FILTER ( Table, 'Table'[Product Number] = EARLIER ( 'Table'[Product Number] ) )
)
&& [Product Number] = EARLIER ( [Product Number] )
)
)
¡Espero que esta respuesta resuelva su problema!
Si necesita ayuda adicional, por favor @ me en su respuesta.
Si mi respuesta le proporcionó una solución, considere marcarla como una solución ✔️ o darle un kudoe 👍
¡Gracias!
¡También puedes echar un vistazo a mi LinkedIn!
Saludos
Gonçalo Geraldes
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.