Forum Discussion
Complex Row Time Difference
There @carlosdajer ,
I am sorry for my behavior.
Here is the right sample pbix file.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Can you do the same but with unsorted rows? I have the index but the timestamp is not in order. How can we achieve the same result?
- v-henryk-mstf5 years agoCommunity Support
Hi Anonymous,
The created Standard answer measure calculates the result of the current row. When the timestamp changes, the value will also change. And the order of calculation will be based on index column, you can observe "var st". In addition, you can refer to the Duration measure, even if it is an unsorted row, it will still be calculated based on the index.
Best regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous5 years agoNot applicable
Thanks for the help. Appreciate the time. m not getting the same results. Im sharing the code + the table
.Duration =var curindex = MAX('OMNI Hours Report'[Index])var nextstartime = CALCULATE(MIN('OMNI Hours Report'[Start Time]),FILTER(ALL('OMNI Hours Report'),'OMNI Hours Report'[Index]>=curindex+1))return DATEDIFF(MAX('OMNI Hours Report'[End Time]),nextstartime,SECOND)