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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
Anonymous
Not applicable

Return The First Date the Staff Failed

Hi there,

 

I want to get the column which returns the first date that staff failed. The table may go like this:

 

Staff   | Date           | Passed?   | Flag                | First Date Failed

A        | 1/9/2021   | Failed       | Non Repeat   | 1/9/2021

A        | 1/10/2021 | Failed       | Repeat           | 1/9/2021

A        | 1/11/2021 | Failed       | Repeat           | 1/9/2021

A        | 1/12/2021 | Passed      | Non Repeat   |

A        | 1/1/2022   | Failed       | Non Repeat   | 1/1/2022

A        | 1/2/2022   | Failed        | Repeat          | 1/1/2022

 

I tried few workarounds like this

First Date Failed = IF(Table[Flag]="Non Repeat && Table[Passed?]="Failed", Table[Date], BLANK())

 

But this DAX only returns the one with first time fail date. Can help me with this?

3 REPLIES 3
Ashish_Mathur
Super User
Super User

Hi,

Create a calculated column formula to extract the Year

Year = year(Data[Date])

First date failed in year = if(Data[Passed?]="Failed",calculate(min(Data[Date]),filter(Data,Data[Staff]=earlier(Data[Staff])&&Data[Passed?]="Failed")),blank())

Hope this helps.


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

Hi, I tried on my report and it only returns the very first date, which is 1/9/2021 for all rows

Hi,

Try this

Year = year(Data[Date])

First date failed in year = if(Data[Passed?]="Failed",calculate(min(Data[Date]),filter(Data,Data[Staff]=earlier(Data[Staff])&&Data[Passed?]="Failed"&&Data[Year]=earlier(Data[Year]))),blank())


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

Helpful resources

Announcements
May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 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.