Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
StefRenneboog91
Regular Visitor

NIVEL DE PRINCIPIANTE - FILTRAR EN LA FECHA

Hey todo,

Muchas gracias por ayudarme en este tema.

Tengo 2 mesas (PA0000 y PA0001)

StefRenneboog91_0-1605004646365.png

Con digamos 2 registros en PA0000 (PERNR 1 & PERNR 2) y 2 registros en PA0001 con también PERNR 1 & 2 pero con diferente fecha de inicio y finalización.

Ahora quiero configurar una medida/columna calculada/columna donde obtengo un 1 para PERNR 1 y un 0 para PERNR 2 porque BEGDA de PERNR1 <- HOY & ENDDA de PERNR 1 > HOY y PERNR de PA0000 (1 en este caso) se encuentra en PA0001.

En "excel terms" quiero hacer un VLOOKUP del PERNR en la tabla PA0001 pero con el filtro adicional de la fecha.

¿Puede alguien ayudarme en esto, por favor?
¡Muchas gracias!
Kr
Stef
1 ACCEPTED SOLUTION
DataInsights
Super User
Super User

@StefRenneboog91,

Pruebe esta medida:

Lookup Result =
VAR vToday =
    TODAY ()
VAR vLookupTable =
    FILTER ( PA0001, vToday >= PA0001[BEGDA] && vToday <= PA0001[ENDDA] )
VAR vResult =
    IF ( COUNTROWS ( vLookupTable ) = 0, 0, 1 )
RETURN
    vResult

Crear imagen de tabla con PA0000[PERNR]:

DataInsights_0-1605119741653.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

1 REPLY 1
DataInsights
Super User
Super User

@StefRenneboog91,

Pruebe esta medida:

Lookup Result =
VAR vToday =
    TODAY ()
VAR vLookupTable =
    FILTER ( PA0001, vToday >= PA0001[BEGDA] && vToday <= PA0001[ENDDA] )
VAR vResult =
    IF ( COUNTROWS ( vLookupTable ) = 0, 0, 1 )
RETURN
    vResult

Crear imagen de tabla con PA0000[PERNR]:

DataInsights_0-1605119741653.png





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.