Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Diference between 2 dates by period

Hi, I need to calculate Time utilization like this: TU = DIVIDE([Rented Out] , [Days]) I need the amount of rented out in days of each vehicle, but what I can not figure out is how to outcome by ...
  • v-chenwuz-msft's avatar
    4 years ago

    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.