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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Extreme-Minimum
Frequent Visitor

Fecha variable para datediff

Hola buenos días, estoy intentando hacer una columna en la que utilizando una fecha seleccionada de otra tabla desde el panel vista de informe pueda hacer un datediff.

Ahora mismo tengo esto:

IF(
    'Tickets Totales'[Estado de solicitud] IN {"Abierto", "En Curso", "En espera", "En Espera Proveedor", "En Espera Usuario", "Postpuesto", "Resuelto"},
    IF(
        'Tickets Totales'[Fecha de finalización] IN {BLANK()},
        DATEDIFF(
           'Tickets Totales'[Fecha de creación],
           -------------
           HOUR
        ),
        BLANK()
        )
    )


Donde tengo los guiones en el datediff es donde necesito poner la fecha variable que pueda seleccionar desde la vista de informe.

Si hace falta algun dato más para poder ayudar los puedo aportar.
1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Hola @Syndicate_Admin ,
Aquí algunos pasos que quiero compartir, puedes consultarlos si se ajustan a tu requerimiento.
Aquí están mis datos de prueba:
Total de entradas

vheqmsft_0-1714961711988.png
Hora

vheqmsft_1-1714961741367.png

Crear medida

Datediff = 
IF(
    SELECTEDVALUE('Total Tickets'[Request Status]) IN {"Open", "Ongoing", "On hold", "Standby Provider", "On Standby User", "Postponed", "Resolved"},
    IF(
        SELECTEDVALUE('Total Tickets'[End Date]) IN {BLANK()},
        DATEDIFF(
        SELECTEDVALUE('Total Tickets'[Date created]),
        SELECTEDVALUE('Time'[Another date]),
        HOUR
    ),
    BLANK()
    )
)

Resultado final

vheqmsft_2-1714961793193.png

Saludos

Alberto He

Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente

View solution in original post

3 REPLIES 3
Extreme-Minimum
Frequent Visitor

hola @Syndicate_Admin lo pruebo y te digo si me ha funcionado 


Gracias!

Syndicate_Admin
Administrator
Administrator

Hola @Syndicate_Admin ,
Aquí algunos pasos que quiero compartir, puedes consultarlos si se ajustan a tu requerimiento.
Aquí están mis datos de prueba:
Total de entradas

vheqmsft_0-1714961711988.png
Hora

vheqmsft_1-1714961741367.png

Crear medida

Datediff = 
IF(
    SELECTEDVALUE('Total Tickets'[Request Status]) IN {"Open", "Ongoing", "On hold", "Standby Provider", "On Standby User", "Postponed", "Resolved"},
    IF(
        SELECTEDVALUE('Total Tickets'[End Date]) IN {BLANK()},
        DATEDIFF(
        SELECTEDVALUE('Total Tickets'[Date created]),
        SELECTEDVALUE('Time'[Another date]),
        HOUR
    ),
    BLANK()
    )
)

Resultado final

vheqmsft_2-1714961793193.png

Saludos

Alberto He

Si esta publicación ayuda, considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente

Perfecto funciona correctamente gracias!

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.

Top Kudoed Authors