Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi Everyone,
I need to get datetime difference between current row and previous row.
Eg: 2nd row - 1st row, 3rd row - 2nd row, 4th row - 3rd row and so on
If the time difference is greater than 10 mins, It need to show an alert in the dashboard like a pop up or in card. My datetime column looks like
Solved! Go to Solution.
Hi @Anonymous
You may add an index column in query editor.Then you may create below measures to filter the table visual to pop up the value.For further,please refer to attached file.
Previous_DateTime = CALCULATE ( SUM ( Table2[DateTime] ), FILTER ( ALL ( Table2 ), Table2[Index] = MAX ( Table2[Index] ) - 1 ) )
Timediff = IF(NOT(ISBLANK([Previous_DateTime])),DATEDIFF([Previous_DateTime],SUM(Table2[DateTime]),MINUTE ))
Filter = IF([Timediff]>10,1)
Regards,
Cherie
Hi @Anonymous
You may add an index column in query editor.Then you may create below measures to filter the table visual to pop up the value.For further,please refer to attached file.
Previous_DateTime = CALCULATE ( SUM ( Table2[DateTime] ), FILTER ( ALL ( Table2 ), Table2[Index] = MAX ( Table2[Index] ) - 1 ) )
Timediff = IF(NOT(ISBLANK([Previous_DateTime])),DATEDIFF([Previous_DateTime],SUM(Table2[DateTime]),MINUTE ))
Filter = IF([Timediff]>10,1)
Regards,
Cherie
User | Count |
---|---|
103 | |
90 | |
78 | |
72 | |
68 |
User | Count |
---|---|
110 | |
96 | |
95 | |
74 | |
71 |