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
Anonymous
Not applicable

Create new table:count rows based on date-time and 2 columns & look at last 3 rows based for each ID

Hi,

 

I have a quiet complicated logic that I would like to use to create a new table. The case is the following:

 

I have devices that each also have an ID. whenever a process has taken place it's recorded and also whether this process was a seccus or failed. I'm interested in the failed processes: If processes for an idea fail at least 3 times in a row, I assume the whole device has failed. I would like to count the cases where at least 3 fails took place after one another. 

I also want a current mode for each device, meaning: wether the device in running as usual, or is in failure mode. Failure mode is when the last 3 records for a device has failed, and no process with succes has occured after it.

 

The way it is noted when a process failed, is when the column "Action" has "Fail" and the column "Status" is empty/blank.

 

I created an example of the table that I have, what logic I want to use, an what table I would like to have in the end:

lotwijnants_0-1690887741590.png

 

I have no idea where to start, I have never worked with cases like this so that's why I'm asking. Any tip is very welcome

1 REPLY 1
Mkarwa-123
Resolver II
Resolver II

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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