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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
jarwest
Helper II
Helper II

How can I filter out certain groups of records based on the most recent record's status?

Hey all,

 

I've got a bit of a complicated problem I've run into here. To preface, I am getting this data from another report's semantic model that I am not allowed to alter, so I can't use Power Query, I admittedly can't even see a way to edit the query on my end or access Power Query.

 

I have a list of Reports, when they refreshed, and if the refresh was successful or failed.

My data currently looks something similar to the following. 

 

Report NameRefresh Start TimeStatus
ReportA4/10/2026 11:00:00 AMSucceeded
ReportA4/10/2026 10:00:00 AMFailed
ReportA4/10/2026 9:00:00 AMFailed
ReportB4/10/2026 11:00:00 AMFailed
ReportB4/10/2026 10:00:00 AMSucceeded
ReportC4/10/2026 11:00:00 AMSucceeded
ReportD4/10/2026 11:00:00 AMFailed

 

I want to show the reports that have failed and have not since successfully refreshed in my data. I currently am just filtering to all failed refreshes, and my table looks like something below

 

Report NameRefresh Start TimeStatus
ReportA4/10/2026 10:00:00 AMFailed
ReportA4/10/2026 9:00:00 AMFailed
ReportB4/10/2026 11:00:00 AMFailed
ReportD4/10/2026 11:00:00 AMFailed

 

However, I need my table to look something like the table below. I basically want to filter out any records where the report has succeeded it's refresh after a failure, or filtering out any records where the report has been refreshed and fixed already.

 

Report NameRefresh Start TimeStatus
ReportB4/10/2026 11:00:00 AMFailed
ReportD4/10/2026 11:00:00 AMFailed

 

Effectively, I need to know if there's a way to make a custom column with DAX that I can use as a filter that would check the latest record for a given report, and let me filter out any reports based on if the latest record for that report has a Status of Succeeded.

 

Any and all help is appreciated. 

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Write this measure

Last refresh status = CALCULATE(MAX(Data[Status]),FILTER(VALUES(Data[Refresh Start Time]),[Refresh Start Time]=MAX(Data[Refresh Start Time])))

In the filter pane, filter this measure on Failed.

Hope this helps.

Ashish_Mathur_0-1775863495811.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
danextian
Super User
Super User

Why is D included in your expected result when it hasn't succeeded?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.

I'm looking for all reports that have failed and have NOT succeeded. I'm basically trying to recreate the Monitor tab's results. I want all reports that have not succeeded.

Ashish_Mathur
Super User
Super User

Hi,

Write this measure

Last refresh status = CALCULATE(MAX(Data[Status]),FILTER(VALUES(Data[Refresh Start Time]),[Refresh Start Time]=MAX(Data[Refresh Start Time])))

In the filter pane, filter this measure on Failed.

Hope this helps.

Ashish_Mathur_0-1775863495811.png

 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
ThxAlot
Super User
Super User

Simple enough,

ThxAlot_0-1775856038157.png



Expertise = List.Accumulate(


        {Days as from Today},


        {Skills and Knowledge},


        (Current, Everyday) => Current & Day.LearnAndPractise(Everyday)


)



cengizhanarslan
Super User
Super User

Please try the measure below:

Report Has Active Failure =
VAR _ThisReport =
    MAX ( Refreshes[Report Name] )
VAR _LatestTime =
    CALCULATE (
        MAX ( Refreshes[Refresh Start Time] ),
        FILTER ( ALL ( Refreshes ), Refreshes[Report Name] = _ThisReport )
    )
VAR _LatestStatus =
    CALCULATE (
        MAX ( Refreshes[Status] ),
        FILTER (
            ALL ( Refreshes ),
            Refreshes[Report Name] = _ThisReport
                && Refreshes[Refresh Start Time] = _LatestTime
        )
    )
RETURN
    IF ( _LatestStatus = "Failed", 1, BLANK () )

 

Then apply it as a visual filter:

Filters on this visual → drag Report Has Active Failure → set to is 1

_________________________________________________________
If this helped, ✓ Mark as Solution | Kudos appreciated
Connect on LinkedIn | Follow on Medium
AI-assisted tools are used solely for wording support. All conclusions are independently reviewed.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

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.