March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi,
I need to calculate Time utilization like this:
Vehicle | Starting date | Ending date |
XS3G75 | 31/01/2022 0:00 | 01/02/2022 0:00 |
XS3G75 | 01/02/2022 0:00 | 02/02/2022 0:00 |
NBT3 -5 | 11/01/2022 0:00 | 12/01/2022 0:00 |
N89M 372 | 11/02/2022 0:00 | 15/02/2022 0:00 |
XS3G75 | 02/02/2022 0:00 | 03/02/2022 0:00 |
NBT3 -5 | 02/02/2022 0:00 | 02/02/2022 0:00 |
NBT3 -5 | 12/01/2022 0:00 | 13/01/2022 0:00 |
XS3G75 | 11/01/2022 0:00 | 12/01/2022 0:00 |
NBT3 -5 | 02/02/2022 0:00 | 04/02/2022 0:00 |
XS3G75 | 12/01/2022 0:00 | 13/01/2022 0:00 |
XS3G75 | 13/01/2022 0:00 | 13/01/2022 0:00 |
XS3G75 | 03/02/2022 0:00 | 03/02/2022 0:00 |
XS3G75 | 03/02/2022 0:00 | 03/02/2022 0:00 |
XS3G75 | 03/02/2022 0:00 | 04/02/2022 0:00 |
XS3G75 | 13/01/2022 0:00 | 14/01/2022 0:00 |
NBT3 -5 | 13/01/2022 0:00 | 14/01/2022 0:00 |
N89M 372 | 15/02/2022 0:00 | 11/02/2022 0:00 |
N89M 372 | 11/02/2022 0:00 | 16/02/2022 0:00 |
N89M 372 | 16/02/2022 0:00 | 11/02/2022 0:00 |
N89M 372 | 11/02/2022 0:00 | 18/02/2022 0:00 |
XS3G75 | 04/02/2022 0:00 | 07/02/2022 0:00 |
NBT3 -5 | 04/02/2022 0:00 | 09/03/2022 0:00 |
NBT3 -5 | 14/01/2022 0:00 | 14/01/2022 0:00 |
XS3G75 | 14/01/2022 0:00 | 28/01/2022 0:00 |
N89M 372 | 07/02/2022 0:00 | 08/12/2021 0:00 |
XS3G75 | 07/02/2022 0:00 | 07/02/2022 0:00 |
XS3G75 | 07/02/2022 0:00 | 30/03/2022 0:00 |
NBT3 -5 | 14/01/2022 0:00 | 21/01/2022 0:00 |
NBT3 -5 | 21/01/2022 0:00 | 26/01/2022 0:00 |
N89M 372 | 08/02/2022 0:00 | 08/02/2022 0:00 |
N89M 372 | 18/02/2022 0:00 | 18/02/2022 0:00 |
N89M 372 | 08/02/2022 0:00 | 09/02/2022 0:00 |
N89M 372 | 18/02/2022 0:00 | 18/02/2022 0:00 |
N89M 372 | 18/02/2022 0:00 | 25/02/2022 0:00 |
N89M 372 | 09/02/2022 0:00 | 10/02/2022 0:00 |
N89M 372 | 10/02/2022 0:00 | 11/02/2022 0:00 |
N89M 372 | 07/03/2022 0:00 | 30/05/2022 0:00 |
N89M 372 | 25/02/2022 0:00 | 28/02/2022 0:00 |
NBT3 -5 | 26/01/2022 0:00 | 02/02/2022 0:00 |
NBT3 -5 | 09/03/2022 0:00 | 09/03/2022 0:00 |
N89M 372 | 28/02/2022 0:00 | 02/03/2022 0:00 |
NBT3 -5 | 09/03/2022 0:00 | 09/03/2022 0:00 |
NBT3 -5 | 09/03/2022 0:00 | 15/03/2022 0:00 |
N89M 372 | 02/03/2022 0:00 | 02/03/2022 0:00 |
N89M 372 | 02/03/2022 0:00 | 02/03/2022 0:00 |
N89M 372 | 02/03/2022 0:00 | 04/03/2022 0:00 |
NBT3 -5 | 15/03/2022 0:00 | 09/03/2022 0:00 |
XS3G75 | 28/01/2022 0:00 | 31/01/2022 0:00 |
N89M 372 | 04/03/2022 0:00 | 07/03/2022 0:00 |
NBT3 -5 | 09/03/2022 0:00 | 21/03/2022 0:00 |
XS3G75 | 01/04/2022 0:00 | 01/04/2022 0:00 |
XS3G75 | 01/04/2022 0:00 | 05/04/2022 0:00 |
NBT3 -5 | 01/04/2022 0:00 | 01/04/2022 0:00 |
NBT3 -5 | 01/04/2022 0:00 | 06/04/2022 0:00 |
XS3G75 | 05/04/2022 0:00 | 05/04/2022 0:00 |
XS3G75 | 05/04/2022 0:00 | 05/04/2022 0:00 |
XS3G75 | 05/04/2022 0:00 | 05/04/2022 0:00 |
XS3G75 | 05/04/2022 0:00 | 08/04/2022 0:00 |
NBT3 -5 | 06/04/2022 0:00 | 06/04/2022 0:00 |
NBT3 -5 | 06/04/2022 0:00 | 07/04/2022 0:00 |
NBT3 -5 | 07/04/2022 0:00 | 08/04/2022 0:00 |
XS3G75 | 05/05/2022 0:00 | 06/06/2022 0:00 |
NBT3 -5 | 08/04/2022 0:00 | 08/04/2022 0:00 |
NBT3 -5 | 08/04/2022 0:00 | 08/04/2022 0:00 |
XS3G75 | 08/04/2022 0:00 | 08/04/2022 0:00 |
XS3G75 | 08/04/2022 0:00 | 08/04/2022 0:00 |
NBT3 -5 | 08/04/2022 0:00 | 08/04/2022 0:00 |
NBT3 -5 | 08/04/2022 0:00 | 11/04/2022 0:00 |
NBT3 -5 | 11/04/2022 0:00 | 23/05/2022 0:00 |
XS3G75 | 08/04/2022 0:00 | 11/04/2022 0:00 |
XS3G75 | 11/04/2022 0:00 | 05/05/2022 0:00 |
NBT3 -5 | 23/05/2022 0:00 | 09/04/2022 0:00 |
NBT3 -5 | 21/03/2022 0:00 | 21/03/2022 0:00 |
NBT3 -5 | 09/04/2022 0:00 | 17/05/2022 0:00 |
NBT3 -5 | 17/05/2022 0:00 | 17/05/2022 0:00 |
NBT3 -5 | 17/05/2022 0:00 | 02/06/2022 0:00 |
N89M 372 | 02/06/2022 0:00 | 03/06/2022 0:00 |
NBT3 -5 | 02/06/2022 0:00 | 23/06/2022 0:00 |
N89M 372 | 03/06/2022 0:00 | 27/12/2046 0:00 |
N89M 372 | 30/05/2022 0:00 | 30/05/2022 0:00 |
XS3G75 | 13/06/2022 0:00 | 15/06/2022 0:00 |
N89M 372 | 30/05/2022 0:00 | 02/06/2022 0:00 |
NBT3 -5 | 21/03/2022 0:00 | 01/04/2022 0:00 |
XS3G75 | 06/06/2022 0:00 | 10/06/2022 0:00 |
XS3G75 | 15/06/2022 0:00 | 15/06/2022 0:00 |
XS3G75 | 15/06/2022 0:00 | 20/06/2022 0:00 |
NBT3 -5 | 23/06/2022 0:00 | 24/06/2022 0:00 |
NBT3 -5 | 24/06/2022 0:00 | 30/06/2022 0:00 |
NBT3 -5 | 30/06/2022 0:00 | 24/06/2022 0:00 |
XS3G75 | 20/06/2022 0:00 | 20/06/2022 0:00 |
XS3G75 | 20/06/2022 0:00 | 20/06/2022 0:00 |
XS3G75 | 20/06/2022 0:00 | 06/07/2022 0:00 |
XS3G75 | 30/03/2022 0:00 | 30/03/2022 0:00 |
NBT3 -5 | 24/06/2022 0:00 | 30/06/2022 0:00 |
NBT3 -5 | 30/06/2022 0:00 | 24/06/2022 0:00 |
NBT3 -5 | 24/06/2022 0:00 | 30/06/2022 0:00 |
NBT3 -5 | 30/06/2022 0:00 | 30/06/2022 0:00 |
XS3G75 | 30/03/2022 0:00 | 30/03/2022 0:00 |
NBT3 -5 | 30/06/2022 0:00 | 30/06/2022 0:00 |
XS3G75 | 30/03/2022 0:00 | 31/03/2022 0:00 |
NBT3 -5 | 30/06/2022 0:00 | 30/06/2022 0:00 |
NBT3 -5 | 30/06/2022 0:00 | 01/07/2022 0:00 |
NBT3 -5 | 01/07/2022 0:00 | 27/12/2046 0:00 |
XS3G75 | 31/03/2022 0:00 | 01/04/2022 0:00 |
XS3G75 | 06/07/2022 0:00 | 07/07/2022 0:00 |
XS3G75 | 07/07/2022 0:00 | 07/07/2022 0:00 |
XS3G75 | 07/07/2022 0:00 | 07/07/2022 0:00 |
XS3G75 | 12/07/2022 0:00 | 13/07/2022 0:00 |
XS3G75 | 07/07/2022 0:00 | 08/07/2022 0:00 |
XS3G75 | 13/07/2022 0:00 | 27/12/2046 0:00 |
XS3G75 | 08/07/2022 0:00 | 12/07/2022 0:00 |
XS3G75 | 10/06/2022 0:00 | 13/06/2022 0:00 |
Solved! Go to Solution.
Hi @Anonymous ,
NETWORKDAYS() will only return the number of workdays between start date and end date than each month.
To get the result you want, please try this.
1 add one more column in date table via Month = [date].[month]
2 create a new calcualte table via
Table_month = filter(CROSSJOIN('Table','Date'),[Date]>=[Starting Date] && [Date]<=[Ending date])
to expend each date between starting date and ending date.
3 create a measure to count how mang days are there during starting and ending date.
countrows('Table_month')
Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous ,
NETWORKDAYS() will only return the number of workdays between start date and end date than each month.
To get the result you want, please try this.
1 add one more column in date table via Month = [date].[month]
2 create a new calcualte table via
Table_month = filter(CROSSJOIN('Table','Date'),[Date]>=[Starting Date] && [Date]<=[Ending date])
to expend each date between starting date and ending date.
3 create a measure to count how mang days are there during starting and ending date.
countrows('Table_month')
Result:
Pbix in the end you can refer.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
89 | |
84 | |
70 | |
51 |
User | Count |
---|---|
206 | |
146 | |
97 | |
79 | |
69 |