Forum Discussion
Calculating time difference between rows with slicers
- 6 years ago
It looks like it is correctly calculating the difference between rows (regardless of the Process). If you'd like to keep the Process in context, you need to add VALUES('Main Table'[Process]) to your Calculate().
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
Anonymous Seems like the issue is that when you are getting the MAX, it is pulling for Line 11 or basically the wrong thing and this is likely because of your ALLSELECTED which I try not to use if at all possible and not sure why you need it. I would start by dropping it.
This post may help. See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586
I have a great version of that in my book, DAX Cookbook.
Also, if you can paste some of your source data or sample source data I can probably adapt the formula from my book for you. 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.