Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I was trying to subtract two columns with date/time, time datatype on the power query but I selected the desired columns the Date , Time options on the Add Columns Section gets disabled . I don't know what is happening here if anyone can help please
I am on the september version
Solved! Go to Solution.
In such situation, there are several useuful function.
If you want to calculate the difference of just houre or minute part if two Date.Time use
Duration.Minutes
Duration.Hours
Duration,Second
But if you want to calculate total differnce in hours or minute use
Duration.TotalHours
Duration.TotalMinutes
In such situation, there are several useuful function.
If you want to calculate the difference of just houre or minute part if two Date.Time use
Duration.Minutes
Duration.Hours
Duration,Second
But if you want to calculate total differnce in hours or minute use
Duration.TotalHours
Duration.TotalMinutes
https://drive.google.com/file/d/10voipz3SMxxKmPu5CMRXYRUVpL2IJsb4/view?usp=drivesdkvideo I don't understand what your are saying but if go to the advanced editor and write the code I am trying to do ,it works
The result of datetime minus datetime is a duration type value. That's why you no longer see the datetime tools. If you want the result to be 12:47:05 AM, then you need to use Duration.TotalDays (not Duration.Days) and then Time.From. So
= Table.AddColumn(PriorStepOrTableName, "Time", each Time.From(Duration.TotalDays[Subtraction])))
--Nate
Use
Duration.Days
If this answer helped resolve your issue, please consider marking it as the accepted answer. And if you found my response helpful, I'd appreciate it if you could give me kudos. Thank you!
User | Count |
---|---|
11 | |
8 | |
5 | |
5 | |
4 |
User | Count |
---|---|
16 | |
14 | |
8 | |
6 | |
6 |