Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
I have a strange situation using DATEDIFF to calculate seconds between two datettime fields. I add a new column in my report called 'Duration':
Duration = DATEDIFF([Alert_Start],[Alert_Finish],SECOND)
Here's some sample data:
Alert_Start = 2017/08/27 00:25:22
Alert_Finish = 2017/08/27 00:25:25
However:
Result = 6 (I used my finders and worked out it really should be three seconds)
Where am I going wrong?
Solved! Go to Solution.
The DAX is OK, are you sure it's not a data issue? Is it counting multiple records against the same index etc? Sample data will proabbly be more help here than anything else.
The DAX is OK, are you sure it's not a data issue? Is it counting multiple records against the same index etc? Sample data will proabbly be more help here than anything else.
Thanks for the hint, it seems I had duplicate rows in my database (although why these were being summarised is beyond me) but removing the duplicate rows solved my problem.
User | Count |
---|---|
128 | |
108 | |
100 | |
64 | |
62 |
User | Count |
---|---|
136 | |
113 | |
102 | |
71 | |
60 |