Forum Discussion
skv17
Helper II
3 years agoCheck if Asset is in a Location between two dates
ok I have a table "Fleetsu Time Asset In Fence" and has columns Ctc_FleetNo,Entered_EventDateStamp , Exited_EventDateStamp and FenceName and the DateDIM table has date column , I need to know what ...
- Anonymous3 years ago
Hi skv17
You can consider to remove the relationship, then create the following measure
Measure 2 = CALCULATE(SUM('Table'[Sum of Duration in Fence Minutes]),FILTER('Table','Table'[Entered_EventDateStamp]<=MAX('Date'[Date])&&'Table'[Exited_EventTimeStamp]>MAX('Date'[Date])))Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ritaf1983
Super User
3 years agoHi skv17
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
- skv173 years ago
Helper II
tc_FleetNo Licence Plate FenceName Entered_EventDateStamp Entered_EventTimeStamp Exited_EventTimeStamp Sum of Duration in Fence Minutes PM326 1GJL589 Depot Hazelmere-Depot1 10/09/2023 0:00 10/09/2023 23:03 10/09/2023 23:25 22 PM701 1HKE056 Depot Hazelmere-Depot1 10/09/2023 0:00 10/09/2023 20:51 11/09/2023 10:52 841 PM309 1GJK770 Depot Hazelmere-Depot1 10/09/2023 0:00 10/09/2023 20:47 11/09/2023 6:57 610 PM309 1GJK770 Depot Hazelmere-Depot1 10/09/2023 0:00 10/09/2023 20:00 10/09/2023 20:12 12 PM309 1GJK770 Depot Hazelmere-Depot1 10/09/2023 0:00 10/09/2023 19:15 10/09/2023 19:26 11 PM309 1GJK770 Depot Hazelmere-Depot1 10/09/2023 0:00 10/09/2023 18:13 10/09/2023 18:20 7 PM309 1GJK770 Depot Hazelmere-Depot1 10/09/2023 0:00 10/09/2023 15:47 10/09/2023 16:00 13 PM326 1GJL589 Depot Hazelmere-Depot1 10/09/2023 0:00 10/09/2023 14:29 10/09/2023 23:02 513 PM326 1GJL589 Depot Hazelmere-Depot1 10/09/2023 0:00 10/09/2023 14:15 10/09/2023 14:28 13 PM309 1GJK770 Depot Hazelmere-Depot1 10/09/2023 0:00 10/09/2023 13:28 10/09/2023 13:38 10