Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Been trying to accurately calculate the date difference between two difference dates and times from two different columns.
I have a table of Job Ids, which has the created on date column for that table.
I have another table jobresponse which has the succeedon column job response time.
These two tables are related by 1 (Job Id) to many relationship. (Job response), and therefore to relate both tables I would have to use related table clause in my calculation. I have tried the following calculation.
I want the time taken column to give me the values back in decimals simliar to this in hours rather than the zeros as decimal points
also the provide me the right calculation by a row by row basis so if the response time is blank in one row for the same work order then the time taken would be blank on the time taken column.
All responses are appreciated.
Solved! Go to Solution.
hi,
According to your description, please try this measure:
Time taken = DIVIDE(DATEDIFF(Job[createdon],SUMX(RELATEDTABLE(slakpiinstances),slakpiinstances[Responsetime]),SECOND),60)
You can also use ‘Fixed’ to set how many decimals you want.
Here is my test table:
And remember to click ‘Show data with no item’ to shows the blank rows.
The result shows:
Here is my test pbix file.
If you still have questions about it, please for free to let me know.
Best Regards,
Giotto Zhi
hi,
According to your description, please try this measure:
Time taken = DIVIDE(DATEDIFF(Job[createdon],SUMX(RELATEDTABLE(slakpiinstances),slakpiinstances[Responsetime]),SECOND),60)
You can also use ‘Fixed’ to set how many decimals you want.
Here is my test table:
And remember to click ‘Show data with no item’ to shows the blank rows.
The result shows:
Here is my test pbix file.
If you still have questions about it, please for free to let me know.
Best Regards,
Giotto Zhi
Thank you
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |