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
Anonymous
Not applicable

Dax para comparar dos columnas basadas en blanco y no en blanco

Expertos

Necesito ayuda. Para simplificar,
La tabla 1 tiene una clave principal única, la tabla 2 tiene clave principal, un campo de fecha y otro campo de texto. Se unió a uno a muchos. La Tabla 2 tiene varias fechas para cada clave principal.
ahora necesito una medida que tome la fecha más reciente para cada clave principal y compruebe si hay el campo de texto correspondiente en esa fila. Si la fecha está allí, pero no el texto, dirá NA. Si ambos están allí, entonces 'sí', si ninguno, entonces 'no'.
He creado una columna de fecha más reciente en la tabla 1. Pero después de eso tener dificultades para escribir una medida para incorporar el descanso.

cualquier ayuda sería apreciada.

Gracias

4 REPLIES 4
v-eachen-msft
Community Support
Community Support

Hola @newcomer ,

ahora necesito una medida que tome la última fecha para cada clave principal y compruebe si hay el campo de texto correspondiente en esa fila

¿El campo de texto es otra columna de la Tabla 2? Puede compartir sus datos de muestra aquí si no tiene ninguna información confidencial. Cargue sus archivos en OneDrive para la Empresa y comparta el enlace aquí.

Community Support Team _ Eads
If this post helps, then please consider Accept it as the solution to help the other members find it.
Anonymous
Not applicable

Sí, el campo de texto es otra columna de la tabla 2 y la solución de la última publicación no funcionó. Seguiré trabajando. Gracias

amitchandak
Super User
Super User

@newcomer , No muy claro , Pero algo como esto

Medida ?
VAR __id - MAX ( 'Tabla'[ID] )
VAR __date - CALCULATE ( MAX( 'Table'[date] ), ALLSELECTED ( 'Table' ), 'Table'[ID] - __id )
RETURN if(CALCULATE ( Max ( 'Table'[Text] ), VALUES ( 'Table'[ID ), 'Table'[ID] - __id, 'Table'[date] á __date ) á "NA", "No","Sí")

Anonymous
Not applicable

Gracias, tratará de hacerle saber si funciona

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.