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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

Días por periodo entre dos Fechas de distinto mes (ejemplo vacaciones)

Hola 

Necesito calcular días tomados por periodo, por ejemplo, para vacaciones, en la que las fechas de inicio y fin son de distinto mes.

Tengo una base de empleados de una empresa en la que la información del sistema se presenta así:

 

Fecha inicio       Fecha Fin     días de vacaciones

25-10-2022       10-11-2022        15 días

 

En la que el resultado esperado para mostrar en gráficas es:

Periodo           días

202210           5

202211          10

 

Ojala puedan ayudarme

 

Saludos

Gonzalo

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Anonymous 

please try

Dias =
SUMX (
    'Table',
    COUNTROWS (
        INTERSECT (
            VALUES ( 'Date'[Date] ),
            CALENDAR ( 'Table'[Fecha inicio], 'Table'[Fecha Fin] )
        )
    )
)

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @Anonymous 

please try

Dias =
SUMX (
    'Table',
    COUNTROWS (
        INTERSECT (
            VALUES ( 'Date'[Date] ),
            CALENDAR ( 'Table'[Fecha inicio], 'Table'[Fecha Fin] )
        )
    )
)

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors