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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
ingridf
Regular Visitor

Nombrar marca de tiempo para cierto período

Hola

Tengo una tabla con la siguiente información:

Período No

Empezar

Final

Personal

1

08:00

14:00

Emma

2

17:00

21:00

Jeff

3

12:00

15:00

Paula

4

15:00

18:00

Emma

También tengo otra tabla, diciendo quién llevó a cabo una determinada tarea y cuándo se llevó a cabo la determinada tarea.

Personal

Tarea

Marca de tiempo

¡NUEVA columna!

Emma

A

08:01

1

Emma

B

08:05

1

Jeff

A

17:10

2

Jeff

A

17:15

2

Paula

B

14:30

3

Emma

C

15:45

4

Emma

A

18:05

-

Quiero crear una nueva columna (¡NUEVA columna! ; P) decir a qué "Período No" pertenece cada tarea, pero no logro vincular las tablas con una clave única.

/Ingrid

1 ACCEPTED SOLUTION
v-lid-msft
Community Support
Community Support

Hola @ingridf ,

Podemos crear una nueva columna calculada para satisfacer sus necesidades.

NEW column! =

VAR new_no =

    CALCULATE (

        MAX ( 'Table'[Period No] ),

        FILTER (

            'Table',

            'Table'[Staff] = EARLIER ( 'Table (2)'[Staff] )

                && 'Table (2)'[Time stamp] >= [Start]

                && 'Table (2)'[Time stamp] <= [End]

        )

    )

RETURN

IF ( ISBLANK ( new_no ), "-", new_no )

Entonces podemos obtener el resultado de esta manera,

32.png


Saludos

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.

View solution in original post

1 REPLY 1
v-lid-msft
Community Support
Community Support

Hola @ingridf ,

Podemos crear una nueva columna calculada para satisfacer sus necesidades.

NEW column! =

VAR new_no =

    CALCULATE (

        MAX ( 'Table'[Period No] ),

        FILTER (

            'Table',

            'Table'[Staff] = EARLIER ( 'Table (2)'[Staff] )

                && 'Table (2)'[Time stamp] >= [Start]

                && 'Table (2)'[Time stamp] <= [End]

        )

    )

RETURN

IF ( ISBLANK ( new_no ), "-", new_no )

Entonces podemos obtener el resultado de esta manera,

32.png


Saludos

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.