Forum Discussion
Formatting dates on a report
Hello
I am new to this and excuse if I am posting in the wrong place. I am doing a direct query from a MSSQL server. I have to calculate time elapsed between two dates. I create a custom column where =[TimeMoveAfterResponding] -[Time_Enroute]. The formula works fine and I see the results in time format since most of the fields are within few minutes if not seconds. In the new column
Which looks good. When I go to the report to view the data, Powerbi does not recognize this field as a datetime and displays a text number where I cannot do anything with it.
I would like to avg the results for different units and it is not allowing me. Any help would be appreciated.
Imad
2 Replies
- parry2k
Super User
Iab maybe you need to add it as a duration, read more here Duration functions - PowerQuery M | Microsoft Learn
Duration.Seconds([TimeMoveAfterResponding] -[Time_Enroute]) - IabNew Member
Thank you. I will try it and let you know. I am new to this and I am working on my first project.