Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I need to calculate the change in a value between hours, minutes and between entries. Similar to how you can do between days or months.
I have no idea how to start or even if it's possible.
Data is inventory level taken at 5 minute intervals.
I suspect that Power BI can't do this. Nothing in DAX for minutes or hours. Not sure about M. Might be something in there.
Data:
| Material | Inventory | TimeStamp |
| 18 | 13 | 4/6/22 3:44:07 PM |
| 18 | 15 | 4/6/22 3:45:56 PM |
| 18 | 12 | 4/6/22 3:50:00 PM |
| 18 | 10 | 4/6/22 3:55:01 PM |
| 18 | 13 | 4/6/22 4:10:00 PM |
| 21 | 5 | 4/6/22 3:44:07 PM |
| 21 | 9 | 4/6/22 3:45:56 PM |
| 21 | 8 | 4/6/22 3:50:00 PM |
| 21 | 4 | 4/6/22 3:55:01 PM |
| 21 | 5 | 4/6/22 4:10:00 PM |
| 26 | 5 | 4/6/22 3:44:07 PM |
| 26 | 3 | 4/6/22 3:45:56 PM |
| 26 | 9 | 4/6/22 3:50:00 PM |
| 26 | 8 | 4/6/22 3:55:01 PM |
| 26 | 2 | 4/6/22 4:10:00 PM |
Output:
| Material | Per Entry | Per Hour |
| 18 | null | |
| 18 | 2 | |
| 18 | -3 | |
| 18 | -2 | -3 |
| 18 | 3 | 3 |
| 21 | null | |
| 21 | 4 | |
| 21 | -1 | |
| 21 | -4 | -1 |
| 21 | 1 | 1 |
| 26 | null | |
| 26 | -2 | |
| 26 | 6 | |
| 26 | -1 | 3 |
| 26 | -6 | -6 |
Solved! Go to Solution.
Hi @pabeader ,
You can refer the following links to get it by DAX or Power Query Editor...
Calculating day/time difference
Handle in Power Query Editor
Get the changes by DAX
Power bi Date Difference – 8 Different Examples
Dynamically Compute Different Time Duration in Power BI Using DAX
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Hi @pabeader
Can you post sample data as text and expected output?
Not enough information to go on;
please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables
Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/
If data is needed then I'm not doing a good enough job explaing the need or the reader isn't going to be able to answer the request.
Hi @pabeader ,
You can refer the following links to get it by DAX or Power Query Editor...
Calculating day/time difference
Handle in Power Query Editor
Get the changes by DAX
Power bi Date Difference – 8 Different Examples
Dynamically Compute Different Time Duration in Power BI Using DAX
If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.
How to upload PBI in Community
Best Regards
Love this work! Unfortunatly, I did NOT do a good enough job in my explinaiton... I'll try adding sample data and expected output.
Any new thoughts about this one?
Check out the November 2025 Fabric update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!