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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ralfgomezc
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
amitchandak
Super User
Super User

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.