cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
New Member

searching acumulate value

Hey I need help with this

 

I got a table

 

KeySequenceStartEndTime
K114:005:0000:20
K115:006:00

00:22

K116:007:00

00:30

K124:005:00

01:30

K125:006:00

01:50

K126:007:00

03:00

K2...

.

K2...

.

K2...

.

K2...

.

K2...

.

 

I need the accumulate time for instance. the value to searching for key "K1" is "04:45" I need to sum for each until the max sequence, and the expected result, must be:

First step the value "04:45" is in the next row: 

KeySequenceStartEndTime
K114:005:0000:20

the result is "04:45" + "00:20" = "05:05"

after that, the new value to search is "05:05" and the second step is

KeySequenceStartEndTime
K125:006:00

01:50

the result is "05:05" + "01:50" = "06:55"

Final result 06:55

 

and if the key has more values for sequence, it must to continue until the max value of sequence.

 

normally this problem it's solved with a loop and auxiliary variables, but I don't know how to solve this problem with DAX.

 

Please your help with this prblem Thanks...!! 

1 REPLY 1
Super User IV
Super User IV

@ralfgomezc , Refer if this can help

https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389

 

Convert to second/ Min first and sum and convert back

 

In Min = hour([Time])*60 + minute([Time])



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Community Conference

Microsoft Power Platform Communities

Check out the Winners!

secondImage

Create an end-to-end data and analytics solution

Learn how Power BI works with the latest Azure data and analytics innovations at the digital event with Microsoft CEO Satya Nadella.

Top Solution Authors
Top Kudoed Authors