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
Syndicate_Admin
Administrator
Administrator

Evolución de la cartera de tickets antiguos a lo largo del tiempo

Hola

He estado tratando de trazar la evolución de la acumulación de tickets antiguos en un gráfico (es decir, quiero poder ver cuántos tickets anteriores a X días estuvieron abiertos todos los días, en los últimos 2 años), y hasta ahora he podido trazar la evolución de todos los backlog (independientemente de su antigüedad) en un gráfico (con DimDate [FullDate] en el eje X) con la siguiente medida:

BacklogOverTime = 
IF ( MAX ( 'DimDate'[FullDate]) <= MAX(FactCases[CreatedDate] ),
COUNTROWS (
    FILTER (
        FactCases,
        FactCases[CreatedDate] <= MAX('DimDate'[FullDate])  &&
            ( FactCases[ClosedDate] > MAX('DimDate'[FullDate]) || ISBLANK( FactCases[ClosedDate]))
        )
)
)

Intenté agregar otra condición AND en la fórmula de filtro COUNTROWS como la siguiente (estaba tratando de capturar solo tickets de más de 120 días), pero no obtengo ningún resultado cuando lo agrego:

DATEDIFF(MAX('DimDate'[FullDate]),FactCases[CreatedDate],DAY)>120

Aprecie cualquier ayuda si alguien está familiarizado con este tipo de cálculos.

Gracias.

1 ACCEPTED SOLUTION
Syndicate_Admin
Administrator
Administrator

Acabo de darme cuenta de que estaba usando mal el último filtro, y DATEDIFF necesitaba primero los 'FactCases' [CreatedDate]. Dejaré la fórmula final que se me ocurrió aquí en caso de que sea útil para alguien en el futuro.

BacklogOverTime_120+ = 
IF ( MAX ( 'DimDate'[FullDate]) <= MAX(FactCases[CreatedDate] ),
COUNTROWS (
    FILTER (
        FactCases,
        FactCases[CreatedDate] <= MAX('DimDate'[FullDate]) &&
           DATEDIFF(FactCases[CreatedDate],MAX('DimDate'[FullDate]),DAY)>120 &&
             ( FactCases[ClosedDate] > MAX('DimDate'[FullDate]) || ISBLANK( FactCases[ClosedDate] ))
        )
)
)

View solution in original post

1 REPLY 1
Syndicate_Admin
Administrator
Administrator

Acabo de darme cuenta de que estaba usando mal el último filtro, y DATEDIFF necesitaba primero los 'FactCases' [CreatedDate]. Dejaré la fórmula final que se me ocurrió aquí en caso de que sea útil para alguien en el futuro.

BacklogOverTime_120+ = 
IF ( MAX ( 'DimDate'[FullDate]) <= MAX(FactCases[CreatedDate] ),
COUNTROWS (
    FILTER (
        FactCases,
        FactCases[CreatedDate] <= MAX('DimDate'[FullDate]) &&
           DATEDIFF(FactCases[CreatedDate],MAX('DimDate'[FullDate]),DAY)>120 &&
             ( FactCases[ClosedDate] > MAX('DimDate'[FullDate]) || ISBLANK( FactCases[ClosedDate] ))
        )
)
)

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.