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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
BYENER
Helper V
Helper V

Group by criteria

Hi,

 

Can someone help me? I have a table with start and end timestamp per processtep per operator. I grouped this data, but the issue is when a operator switched from processtep to another processtep and later back to the first processtep then the group by function take the first time and the last. I need the last time before the operator switch to another processtep. See below 

 

Operator (operator_id) 2828 started at 08:37:54 with processstep_id 1060. At 09:41:13 he switched to processtep 1073 and at 09:50:05 back to the first processtep 1060. When I group this data I would like to see the next:

 

Start: 08:37:54 End: 09:36:56 Processtep_id: 1060 Operator: 2828

Start: 09:41:13 End: 09:42:36 Processtep_id: 1073 Operator: 2828

Start: 09:50:05 End: 09:53:02 Processtep_id: 1060 Operator: 2828

 

Untitled.png

3 REPLIES 3
Greg_Deckler
Community Champion
Community Champion

See if my MTBF works for you. See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395...

 

It has very similar requirements.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Hi @Greg_Deckler 

 

Thank you for your reply. I tried it, but it's too difficult to translate your formula to my data :).

 

Is there another way to do that in PowerQuery instead of DAX?

Does someone else another solution for me?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.