Forum Discussion
Get Next Larger DateTime
- 4 years ago
Hi,
Write this calculated column formula in the tblHold Table
=calculate(min(tblRelease[date_time]),filter(tblRelease,tblRelease[work_order_id]=earlier(tblHold[work_order_id])&&tblRelease[date_time]>earlier(tblHold[date_time])))
Hope this helps.
UncleLewis Read this post to get your answer quickly.
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
Thanks parry2k,
Here is a screen shot of my source tables and the final table I am trying to achieve
I have a table with hold times
I have another table with release times
The tables have the same work_order_id
However for the release time there may be 0-n records for release time
Additionally, there are release times that are before the hold time. These should be skipped as the relase time must always follow the hold time.
I think an approximate match should work, just not sure how to do that in DAX.
Thanks,
-w
- Ashish_Mathur4 years agoSuper User
Hi,
Write this calculated column formula in the tblHold Table
=calculate(min(tblRelease[date_time]),filter(tblRelease,tblRelease[work_order_id]=earlier(tblHold[work_order_id])&&tblRelease[date_time]>earlier(tblHold[date_time])))
Hope this helps.