Forum Discussion
DATEDIFF between DateTime Values by ID
- 5 years ago
Anonymous , Try a measure like
averageX(values(Table[ID]), calculate(datediff(minx(filter(Table, Table[Entry] =1), [DateTime]),maxx(filter(Table, Table[exit] =1), [DateTime]),minute)))
Thanks!
downloaded the pbix. and your solution works for the sample data. However, it returned null values for my actual dataset.
must be the if()? could be that my IDs are text not numerical?
Hi, Anonymous
Thank you for your feedback.
in my sample, ID is a number format.
If your ID column is a text format, please try writing something like below.
"1" "2" ...
Thank you.
Hi, My name is Jihwan Kim.
If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.
Linkedin: linkedin.com/in/jihwankim1975/
Twitter: twitter.com/Jihwan_JHKIM