Forum Discussion
Hours Subtraction
- 6 years ago
Hi Anonymous ,
It seems that the a time expression with TIME function is unsupported to calculate in DATESBETWEEN function, since it's syntax is like DATESBETWEEN(<dates>, <start_date>, <end_date>) , which only accepts a date expression for the second and third argument.
CALCULATE(SUM(vwDimDate[WorkingDayFlag]), DATESBETWEEN(vwDimDate[Date],MAX('Room Utilisation'[New Start Date]),
[ParameterEndDate]))-1 *10/24 + TIME(18,0,0) - MAX('Room Utilisation'[Start Time, ])
Best Regards,
Amy
Community Support Team _ Amy
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous , for this you need to create it like text
refer
https://community.powerbi.com/t5/Quick-Measures-Gallery/Chelsie-Eiden-s-Duration/m-p/793639#M389
Hi amitchandak ,
Many thanks for that. Ive realised its this part of the calculation below.
- Anonymous6 years agoNot applicable
Hi amitchandak ,
In short I need to get from 6.416666667 to 154:00:00 ([h]:mm:ss), which excel does.
Ive looked at many threads but nothing is equaling it.
Thanks
- amitchandak6 years ago
Super User
Anonymous , I doubt you have 154 hours here. So you have create a text like that.
6.6.416666667 *3600 Second
Now from here get hours min and sec using mod and quotient and create that string.
- Anonymous6 years agoNot applicable
Hi amitchandak
Do you know how excel calculates using [h]:mm:ss as it gives me 154:00:00 but hh:mm gives 10:00