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
torbenani
Frequent Visitor

Contar caso de soporte abierto

Para una aplicación de escritorio de servicio, quiero contar el número de casos abiertos un momento determinado. Tengo columnas de fecha de remolque "CreatedDate" y "SolutionDate". El caso se considera abierto en cualquier "fecha dada" si:

CreatedDate < "fecha dada" Y

SolutionDate > "fecha dada" O SolutionDate es BLANK
He probado el COUNTROWS en DAX con filtros, pero no puedo hacer que funcione. Cualquier ayuda es apreciada.

Mi objetivo es ceabonar un gráfico, que semana a semana muestra el desarrollo en el número de casos.

Gracias.

6 REPLIES 6
v-jayw-msft
Community Support
Community Support

Hola @torbenani ,

Por favor, compruebe los siguientes pasos como se indica a continuación.

1o Crear tabla calculada.

CALENDAR = CALENDAR(MIN('Table'[Created_on]),TODAY())

2o Crear medidas.

isopen =
IF (
    SELECTEDVALUE ( 'Table'[Created_on] ) <= SELECTEDVALUE ( 'CALENDAR'[Date] )
        && (
            SELECTEDVALUE ( 'Table'[Closed_on] ) >= SELECTEDVALUE ( 'CALENDAR'[Date] )
                || ISBLANK ( SELECTEDVALUE ( 'Table'[Closed_on] ) )
        ),
    1,
    0
)

counts = SUMX('Table',[isopen])

3o Utilice 'CALENDAR'[Fecha] como segmentación de datos.

El resultado se mostrará como se muestra a continuación.

2.PNG3.PNG

Saludos

Jay

Equipo de Apoyo Comunitario _ Jay Wang

Si este post ayuda,entonces por favor considere Aceptarlo como la solución para ayudar a los otros miembros a encontrarlo más rápidamente.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.
az38
Community Champion
Community Champion

Hola @torbenani

la mejor práctica sería crear una tabla de calendario

Calendar Table = CALENDAR(MIN(Table[CreatedDate]), MAX(Table[SolutionDate]) )

la adición a ella una medida

Open Cases = 
CALCULATE(COUNTROWS(Table), FILTER(ALL(Table), 
Table[CreatedDate] < SELECTEDVALUE('Calendar Table'[Date]) && (Table[SolutionDate] > SELECTEDVALUE('Calendar Table'[Date]) OR ISBLANK(Table[SolutionDate]))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hola AZ38
Muchas gracias por tu ayuda. Cuando utilizo la medida, obtengo "La sintaxis de 'OR' es incorrecta. " Podrías darme una gudie.

Casos abiertos ?
CALCULATE(COUNTROWS(Bi_RequestService), FILTER(ALL(Bi_RequestService),
Bi_RequestService[createDate] < SELECTEDVALUE('Calendar'[Date]) && (Bi_RequestService[solutionDate] > SELECTEDVALUE('Calendar'[Date]) OR ISBLANK(Bi_RequestService[solutionDate]))

Gracias

az38
Community Champion
Community Champion

@torbenani

Oh, lo siento, mi mal

Open Cases = 
CALCULATE(COUNTROWS(Table), 
FILTER(ALL(Table), 
Table[CreatedDate] < SELECTEDVALUE('Calendar Table'[Date]) && 
(Table[SolutionDate] > SELECTEDVALUE('Calendar Table'[Date]) || ISBLANK(Table[SolutionDate]))
)
)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

az38 - Gracias por su ayuda. Esto funciona perfecto.

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.