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
JaimeHernandezP
Regular Visitor

Filter Failed jobs

Hy there I'm so newby with modeling I try to filter failed jobs in my report

 

I have a table with 3 columns Jobs, Date status.

 

JOBDATESTATUS
app30/03/2022Failed
app30/03/2022Success
app31/03/2022Success

 

Jobs run daily. If a job fails, it runs again.

 

I am trying to extract only the failed jobs that have no successful results on the same day.

For example:

JOBDATESTATUSRESULT
app30/03/2022failed 
app30/03/2022successsuccess
app31/03/2022successsuccess
app1/04/2022failedfailed
app2/04/2022successsucces
    
5 REPLIES 5
v-kkf-msft
Community Support
Community Support

Hi @JaimeHernandezP ,

 

Please try the following formula:

 

Measure = 
VAR count_ =
    CALCULATE (
        DISTINCTCOUNT ( 'Table'[STATUS] ),
        ALLEXCEPT ( 'Table', 'Table'[DATE] )
    )
RETURN
    IF (
        count_ = 1,
        MAX ( 'Table'[STATUS] ),
        IF ( MAX ( 'Table'[STATUS] ) = "success", "success" )
    )

vkkfmsft_1-1649066936313.png


If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

amitchandak
Super User
Super User

@JaimeHernandezP , Create a measure like this one and plot with Job

 

Countx(Filter(Table, Table[Job], "_1", countrows(filter(Table, Table[STATUS] ="success")) , "_2", countrows(filter(Table, Table[STATUS] ="failed")))
isblank(_1) && not(Isblank(_2)))

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

Sorry. I tried but the syntax is wrong.

Capture.JPG

@JaimeHernandezP , Sorry my mistake

 

Try like

Countx(Filter(Summarize(Table, Table[Job], "_1", countrows(filter(Table, Table[STATUS] ="success")) , "_2", countrows(filter(Table, Table[STATUS] ="failed"))) ,isblank(_1) && not(Isblank(_2)) ) ,[JOB])

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

@amitchandak tank you so much for stepping.

 

I tried your command, but the error persists.Capture1.JPG

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.