Forum Discussion
How to calculate the Overdue time difference
- Anonymous7 years ago
Based on the error message it would seem to me that you have stored this DateTime data inside Power BI using the datatype of "Text".
My recommendation would be to go into Edit Queries and change the data type of both columns to "DateTime".
For the "Overdue" portion, i'd simply create a new column (do this from inside Edit Queries) to flag if any row is overdue. This could be done from the Add Column option and simply use
[Asset_Exit_DateTime] > [Asset_Estimated_Exit_DateTime]
Set this column to be of type "True/False"
- Anonymous7 years agoNot applicable
Based on the error message it would seem to me that you have stored this DateTime data inside Power BI using the datatype of "Text".
My recommendation would be to go into Edit Queries and change the data type of both columns to "DateTime".
For the "Overdue" portion, i'd simply create a new column (do this from inside Edit Queries) to flag if any row is overdue. This could be done from the Add Column option and simply use
[Asset_Exit_DateTime] > [Asset_Estimated_Exit_DateTime]
Set this column to be of type "True/False"
- Anonymous7 years agoNot applicable
Thanks Anonymous. I am now getting the details without any error and also able to derive overdue(true/false). Now, finding hard to visualize the "Duration" field ie. time difference data. can you suggest the best way to represent the info?
appreciate your help and assisntance.
regards
- affan7 years ago
Solution Sage
Hi Anonymous,
As the code you have mentioned for the difference column, this seems to be working fine. You need to check if both your date columns are having correct data type. The second thing you need to consider is to remove any 'null' or blank values which may be causing error in the data model to convert the column to date time format.
If this helped you, please mark this post as an accepted solution and like to give KUDOS .
Regards,
Affan
- Anonymous7 years agoNot applicable
thanks affan.. got the desired result. now finding ways to represent the duration values in graphical chart or something.. any suggestions would be highly appreciated
thanks