Forum Discussion
Time difference between date time values in same column based on a value in a different column
- 6 years ago
Hi Anonymous ,
Here is the pbix PBIX
I put both columns in so that you have your choice, the second column only shows in the last row of the user. The difference between the measure and the column at the high level, is that with a measure, the engine does not have row context, whereas in the table it does. (It knows which row it is operating on.) Therefore it was just a matter of dropping MAX().
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
Hi Nathaniel_C ,
I just imported my example data into a new file and ran your function on it but my results do not match to what you had.
Hi Anonymous ,
Try it as a measure, not a calculated column. Looking at your first picture that is what i built it for. Put the first 5 columns on a table, then add the measure.
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel
- Anonymous6 years agoNot applicable
Hi! Sorry for not specifying that i needed it as a calculated column, because I am doing some other calculations based on the elapsed time. When I return the past time, it is incorrectly returning the time per user. For example, for JF, it should return
9/30/2019 8:16:00 AM and for the MK it should return 10/1/2019 4:11:00 PM. I feel like if I could get this working, the rest of the function would be correct.
I appreciate the help!
- Nathaniel_C6 years agoCommunity Champion
Hi Anonymous ,
Here is the pbix PBIX
I put both columns in so that you have your choice, the second column only shows in the last row of the user. The difference between the measure and the column at the high level, is that with a measure, the engine does not have row context, whereas in the table it does. (It knows which row it is operating on.) Therefore it was just a matter of dropping MAX().
Let me know if you have any questions.
If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel- Anonymous6 years agoNot applicable
Thanks so much for your help! This worked!