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
jitpbi
Post Patron
Post Patron

mostrar dispositivos defectuosos

Hola

el siguiente es el ejemplo de mi conjunto de datos y el objeto visual basado en este conjunto de datos:

DatetimeDispositivoFallas
10/22/20 8:10 PMASano
10/22/20 9:20 PMAdesintegración
10/22/20 10:10 PMAApagado
10/22/20 11:05 PMASobrecalentamiento
10/22/20 8:45 PMASano
10/22/20 8:50 PMASano
10/22/20 8:10 PMBSano
10/22/20 9:20 PMBSobrecalentamiento
10/22/20 10:10 PMBSano
10/22/20 11:05 PMBSano
10/22/20 8:45 PMBSano
10/22/20 8:50 PMBSano

Ahora, necesito mostrar el nombre de los dispositivos si la suma de errores % (desglose + sobrecalentamiento + Apagado) es más del 25% en las últimas 24 horas y debe ser diplay en un objeto visual separado como este:

"El dispositivo (A) tiene más del 25% de fallas"

el nombre del dispositivo debe venir dinámicamente, también, si los dispositivos mutiple tienen más de 25% de fallas en el momento, entonces debe mostrar todos los nombres de los dispositivos como: "Dispositivo (A,B,C.....) tener más del 25% de fallas"

Por favor, sugiera cómo lograr esto.

Gracias

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hola @jitpbi ,

Prueba esto:

Measure =
VAR t =
    SUMMARIZE (
        FILTER (
            ADDCOLUMNS (
                'Table',
                "GT_Count_Percent_",
                    CALCULATE (
                        COUNT ( 'Table'[Faults] ),
                        FILTER (
                            ALLSELECTED ( 'Table' ),
                            'Table'[Device] = EARLIER ( 'Table'[Device] )
                                && 'Table'[Faults] IN { "breakdown", "overheating", "Shutdown" }
                        )
                    )
                        / CALCULATE (
                            COUNT ( 'Table'[Faults] ),
                            FILTER (
                                ALLSELECTED ( 'Table' ),
                                'Table'[Device] = EARLIER ( 'Table'[Device] )
                            )
                        )
            ),
            [GT_Count_Percent_] > 0.25
        ),
        [Device]
    )
VAR Device_ =
    CONCATENATEX ( t, [Device], ", " )
RETURN
    SWITCH (
        COUNTROWS ( t ),
        0, "No device is having more than 25% faults.",
        1,
            "Device (" & Device_ & ") is having more than 25% faults.",
        "Device (" & Device_ & ") are having more than 25% faults."
    )

device.JPG

Saludos

Icey

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

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

Hola @jitpbi ,

Prueba esto:

Measure =
VAR t =
    SUMMARIZE (
        FILTER (
            ADDCOLUMNS (
                'Table',
                "GT_Count_Percent_",
                    CALCULATE (
                        COUNT ( 'Table'[Faults] ),
                        FILTER (
                            ALLSELECTED ( 'Table' ),
                            'Table'[Device] = EARLIER ( 'Table'[Device] )
                                && 'Table'[Faults] IN { "breakdown", "overheating", "Shutdown" }
                        )
                    )
                        / CALCULATE (
                            COUNT ( 'Table'[Faults] ),
                            FILTER (
                                ALLSELECTED ( 'Table' ),
                                'Table'[Device] = EARLIER ( 'Table'[Device] )
                            )
                        )
            ),
            [GT_Count_Percent_] > 0.25
        ),
        [Device]
    )
VAR Device_ =
    CONCATENATEX ( t, [Device], ", " )
RETURN
    SWITCH (
        COUNTROWS ( t ),
        0, "No device is having more than 25% faults.",
        1,
            "Device (" & Device_ & ") is having more than 25% faults.",
        "Device (" & Device_ & ") are having more than 25% faults."
    )

device.JPG

Saludos

Icey

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

amitchandak
Super User
Super User

@jitpbi , Pruebe una medida como

concatenatex(filter(summarize(Table, Table[Device], "_1", divide(calculate(countrows(Table), filter(Table, [Faults] in '"breakdown","overheating","Shutdown"-)),countrows(Table))),[_1] >.25),[Device])

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.