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
Antonio74
Regular Visitor

Order data

Hello, I have this situation. My point control clock gives me 1 line for each movement. As you can see in the file in green, the operator 1552 it's in at 08:06:00 and gets out at 16:09:00.  In this case he works 08:03:00   
how can I get thease values in the same line ( time in and time out ) in Power query ?

CCCED301-BBFD-43EF-8593-9E63D6333939.jpeg

3 REPLIES 3
wdx223_Daniel
Community Champion
Community Champion

if all the ENTRADA and SAIDA come in pairs in the column of DIRECTION, then try this code:

NewStep=let a={"ENTRADA","SAIDA"} in Table.Combine(Table.Group(PreviousStepName,{"COLABORADOR","DATA REGISTO"},{"n",each #table({"COLABORADOR","Date","TotalTime"}&List.TransformMany({1..Table.RowCount(_)/2},each a,(x,y)=>Text.From(x)&"# "&y),{{[COLABORADOR]{0},[DATA REGISTO]{0},List.Sum(List.Transform(List.Split([HORA PICAGEM],2),each _{1}-_{0}))}&[HORA PICAGEM]})})[n])

 

 Good morning, first of all thanks for the help. when applying this step I get the error "Expression.Error: The number is out of range of a 32-bit integer value.
Details: 0.5"
I suppose it's because someone forgot some record

you may get a odd number of rows

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.