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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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