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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
jitpbi
Post Patron
Post Patron

display faulty devices

Hi,

 

the below is the sample of my dataset and the visual based on this dataset:

 

DatetimeDeviceFaults
10/22/20 8:10 PMAhealthy
10/22/20 9:20 PMAbreakdown
10/22/20 10:10 PMAshutdown
10/22/20 11:05 PMAoverheating
10/22/20 8:45 PMAhealthy
10/22/20 8:50 PMAhealthy
10/22/20 8:10 PMBhealthy
10/22/20 9:20 PMBoverheating
10/22/20 10:10 PMBhealthy
10/22/20 11:05 PMBhealthy
10/22/20 8:45 PMBhealthy
10/22/20 8:50 PMBhealthy

 

jitpbi_1-1603369818273.png

 
 

Now, I need to display the devices name if the sum of faults % (breakdown+overheating+Shutdown) is more than 25% in the last 24 hours and it should be diplay on a separate visual like this:

 

"Device (A) is having more than 25% faults"

 

the device name should come dynamically, also, if mutiple devices have more than 25% faults at time then it should display all the devices name like: "Device (A,B,C.....) having more than 25% faults"

 

Please suggest how to achieve this.

 

Thanks

 

1 ACCEPTED SOLUTION
Icey
Community Support
Community Support

Hi @jitpbi ,

 

Try this:

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

 

 

Best regards

Icey

 

If this post helps,then consider Accepting it as the solution to help other members find it faster.

View solution in original post

2 REPLIES 2
Icey
Community Support
Community Support

Hi @jitpbi ,

 

Try this:

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

 

 

Best regards

Icey

 

If this post helps,then consider Accepting it as the solution to help other members find it faster.

amitchandak
Super User
Super User

@jitpbi , Try a measure like

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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