cancel
Showing results for
Did you mean:
New Member

searching acumulate value

Hey I need help with this

I got a table

 Key Sequence Start End Time K1 1 4:00 5:00 00:20 K1 1 5:00 6:00 00:22 K1 1 6:00 7:00 00:30 K1 2 4:00 5:00 01:30 K1 2 5:00 6:00 01:50 K1 2 6:00 7: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:

 Key Sequence Start End Time K1 1 4:00 5:00 00: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

 Key Sequence Start End Time K1 2 5:00 6: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.

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])

Proud to be a Super User!

Announcements

Power Platform Community Conference

Check out the on demand sessions that are available now!

Microsoft Power Platform Communities

Check out the Winners!

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